How to load the block with Header,Footer,Left navigation, Right navigation in magento 2?

How to load the block with Header, Footer, Left navigation, Right navigation in Magento 2?

step by step please tell me

Solutions

Create cms block and add that block id in your layout file , i.e You have created new cms block and its id is custom-block and you want to add that block in footer then in your theme's default.xml file add block code :

<!-- Footer Section -->
<referenceContainer name="footer" htmlClass="footer content">
    <container name="footer-col3" htmlTag="div" htmlClass="col-lg-12">
        <block class="Magento\Cms\Block\Block" name="footer-custom" before="-">
           <arguments>
              <argument name="block_id" xsi:type="string">custom-block</argument>
          </arguments>
       </block>
   </container>
</referenceContainer>

so this piece of code :

<block class="Magento\Cms\Block\Block" name="block-custom" before="-">
    <arguments>
       <argument name="block_id" xsi:type="string">custom-block</argument>
    </arguments>
</block>

you would need to add where ever you need to call that block :

NOTE : change block name "footer-custom" for other sections , otherwise it will load that block only once.

Similar questions

Magento2 move the block from right to left without removing
I need to move the Compare products and My Wish list blocks to the left of the page. I have my page like, where my Compare products should come to the right: I did something like : But im not sure if destination element is proper, but the Compare product block is not moving!
move the block of compare products from right to footer page
i'm new in Magento world and a few minutes ago i had an error. I'm trying to apply a modify in catalog.xml file: move the block of compare products from right to footer page. For test i trying to move the line: in footer section of page.xml file (this is stupid, but i wanted to try :) ); and after this, the frontend is disappear, page white. I enab...
How can I move my cart from my header into the right of my navigation?
I would like to know how to move my cart icon into my navigation instead of the header. How can I do this?
Customize and display navigation on the top right of header
I'm working with Magento 2.2.5 i want to move navigation menu to the top right of header. also i want to know which file i can edit to customize navigation menu Thanks. UPDATE : I want my headr to look like that :
how to move newsletter block from footer to left in magento
Originally, I had the newsletter block in the footer, this is code: I then pasted the above code into the left column instead. After this, I deleted it from the footer but, it is still persisting in footer for some reason. How do I remove the newsletter block from the footer, since deleting it didn't seem to remove it? Any help would be appreciated...
Can I made a full-width block before the footer on a 2columns-left page?
I would like to put a full-width block just before my footer on my search results page (<catalogsearch_result_index>) using my local.xml file, but I can't seem to figure out how to do it. I have a block I made as a core/template type that is working on other pages. It is a carousel with products in it. When I add it to the search results page...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.