Magento2: How to remove footer and header for the second store created?How to create two store views with different designs?No Homepage CMS or Footer Links on second Magento Store? Multi-DomainLinking a category to a pageMagento2 store and store viewChange the structure of the footer in Magento2Magento 2 - How to Manage different theme for different store?How to create admin user for specific store in magento2?Magento 2 : How to remove the default Store langauge code from the URLHow to add new custom dynamic link in magento2 top header links?How can i reselect the website option from store view?

How can I tell if a flight itinerary is fake

What does VB stand for?

Why are the inside diameters of some pipe larger than the stated size?

Do other countries guarantee freedoms that the United States does not have?

What is to be understood by the assertion 'Israels right to exist'?

How quickly could a country build a tall concrete wall around a city?

Ampacity of Conductive Tape

Will a paper be retracted if a flaw in released software code invalidates its central idea?

Unexpected route on a flight from USA to Europe

Where to pee in London?

How to realistically deal with a shield user?

What are good ways to improve as a writer other than writing courses?

Secure my password from unsafe servers

French equivalent of "Make leaps and bounds"

Purchased new computer from DELL with pre-installed Ubuntu. Won't boot. Should assume its an error from DELL?

How does the oscilloscope trigger really work?

Is it double speak?

Does this put me at risk for identity theft?

Why can I log in to my Facebook account with a misspelled email/password?

What are the examples (applications) of the MIPs in which the objective function has nonzero coefficients for only continuous variables?

Is alignment needed after replacing upper control arms?

Did WWII Japanese soldiers engage in cannibalism of their enemies?

Why should public servants be apolitical?

Look mom! I made my own (Base 10) numeral system!



Magento2: How to remove footer and header for the second store created?


How to create two store views with different designs?No Homepage CMS or Footer Links on second Magento Store? Multi-DomainLinking a category to a pageMagento2 store and store viewChange the structure of the footer in Magento2Magento 2 - How to Manage different theme for different store?How to create admin user for specific store in magento2?Magento 2 : How to remove the default Store langauge code from the URLHow to add new custom dynamic link in magento2 top header links?How can i reselect the website option from store view?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I have created two stores in Magento2.
One is main website and the second one is retailer site.
I need to remove the footer section and the navigation bar for my retailer site.
I also need to remove the favorites section from the header only for my retailer site.



Please anyone guide me on this.



Any help would be appreciated.










share|improve this question






























    2















    I have created two stores in Magento2.
    One is main website and the second one is retailer site.
    I need to remove the footer section and the navigation bar for my retailer site.
    I also need to remove the favorites section from the header only for my retailer site.



    Please anyone guide me on this.



    Any help would be appreciated.










    share|improve this question


























      2












      2








      2








      I have created two stores in Magento2.
      One is main website and the second one is retailer site.
      I need to remove the footer section and the navigation bar for my retailer site.
      I also need to remove the favorites section from the header only for my retailer site.



      Please anyone guide me on this.



      Any help would be appreciated.










      share|improve this question














      I have created two stores in Magento2.
      One is main website and the second one is retailer site.
      I need to remove the footer section and the navigation bar for my retailer site.
      I also need to remove the favorites section from the header only for my retailer site.



      Please anyone guide me on this.



      Any help would be appreciated.







      magento2 footer stores headerlink






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 29 at 9:44









      AmyAmy

      4411 silver badge10 bronze badges




      4411 silver badge10 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          0














          There is another way to can remove the block from the layout.



          Create layout unique handle fro each store like store_en , store_retailer, where to assume that the retailer is the store code of your retailer store & `en is default store code.



          Add custom layout handle using on layout_load_before.



          Observer code



           <?php
          namespace StackExchangeMagentoObserverFrontend;

          class LayoutLoadBefore implements MagentoFrameworkEventObserverInterface

          /**
          * @var MagentoStoreModelStoreManagerInterface
          */
          private $storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )
          $this->storeManager = $storeManager;


          public function execute(MagentoFrameworkEventObserver $observer)

          $layout = $observer->getEvent()->getLayout();

          $handlecode ='store_'.strtolower($this->storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);
          return $this;





          public function execute(MagentoFrameworkEventObserver $observer)


          $layout = $observer->getLayout();
          $handlecode = 'store_'. strtolower($this->_storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);

          return $this;

          }


          After adding this observer, you need to do Cache flush/Di compile.



          Now. if you need to create a handler file at app/code/Vendorname/Module Name/view/frontend/layout/store_retailerSITEStoreCode.xml



          <?xml version="1.0" ?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceContainer name="header.container" remove="true" />
          <referenceContainer name="footer" remove="true" />
          </body>
          </page>





          share|improve this answer



























          • Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

            – Amy
            Jul 29 at 13:20











          • Could you please help me how to resolve this.

            – Amy
            Jul 29 at 13:20











          • Still the same error I am receiving.

            – Amy
            Jul 29 at 14:12











          • Please check your files/folder permission...

            – Amit Bera
            Jul 29 at 14:13











          • Thanks Amit, It is working perfectly fine.. Ur really a genius.

            – Amy
            Jul 29 at 16:51


















          1














          I would recommend creating a child theme for your retailer site and remove elements accordingly.






          share|improve this answer

























          • Can you share me some examples, how to create a child theme

            – Amy
            Jul 29 at 10:07











          • I have already created a child theme for my main website.

            – Amy
            Jul 29 at 10:07













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f283635%2fmagento2-how-to-remove-footer-and-header-for-the-second-store-created%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          There is another way to can remove the block from the layout.



          Create layout unique handle fro each store like store_en , store_retailer, where to assume that the retailer is the store code of your retailer store & `en is default store code.



          Add custom layout handle using on layout_load_before.



          Observer code



           <?php
          namespace StackExchangeMagentoObserverFrontend;

          class LayoutLoadBefore implements MagentoFrameworkEventObserverInterface

          /**
          * @var MagentoStoreModelStoreManagerInterface
          */
          private $storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )
          $this->storeManager = $storeManager;


          public function execute(MagentoFrameworkEventObserver $observer)

          $layout = $observer->getEvent()->getLayout();

          $handlecode ='store_'.strtolower($this->storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);
          return $this;





          public function execute(MagentoFrameworkEventObserver $observer)


          $layout = $observer->getLayout();
          $handlecode = 'store_'. strtolower($this->_storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);

          return $this;

          }


          After adding this observer, you need to do Cache flush/Di compile.



          Now. if you need to create a handler file at app/code/Vendorname/Module Name/view/frontend/layout/store_retailerSITEStoreCode.xml



          <?xml version="1.0" ?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceContainer name="header.container" remove="true" />
          <referenceContainer name="footer" remove="true" />
          </body>
          </page>





          share|improve this answer



























          • Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

            – Amy
            Jul 29 at 13:20











          • Could you please help me how to resolve this.

            – Amy
            Jul 29 at 13:20











          • Still the same error I am receiving.

            – Amy
            Jul 29 at 14:12











          • Please check your files/folder permission...

            – Amit Bera
            Jul 29 at 14:13











          • Thanks Amit, It is working perfectly fine.. Ur really a genius.

            – Amy
            Jul 29 at 16:51















          0














          There is another way to can remove the block from the layout.



          Create layout unique handle fro each store like store_en , store_retailer, where to assume that the retailer is the store code of your retailer store & `en is default store code.



          Add custom layout handle using on layout_load_before.



          Observer code



           <?php
          namespace StackExchangeMagentoObserverFrontend;

          class LayoutLoadBefore implements MagentoFrameworkEventObserverInterface

          /**
          * @var MagentoStoreModelStoreManagerInterface
          */
          private $storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )
          $this->storeManager = $storeManager;


          public function execute(MagentoFrameworkEventObserver $observer)

          $layout = $observer->getEvent()->getLayout();

          $handlecode ='store_'.strtolower($this->storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);
          return $this;





          public function execute(MagentoFrameworkEventObserver $observer)


          $layout = $observer->getLayout();
          $handlecode = 'store_'. strtolower($this->_storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);

          return $this;

          }


          After adding this observer, you need to do Cache flush/Di compile.



          Now. if you need to create a handler file at app/code/Vendorname/Module Name/view/frontend/layout/store_retailerSITEStoreCode.xml



          <?xml version="1.0" ?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceContainer name="header.container" remove="true" />
          <referenceContainer name="footer" remove="true" />
          </body>
          </page>





          share|improve this answer



























          • Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

            – Amy
            Jul 29 at 13:20











          • Could you please help me how to resolve this.

            – Amy
            Jul 29 at 13:20











          • Still the same error I am receiving.

            – Amy
            Jul 29 at 14:12











          • Please check your files/folder permission...

            – Amit Bera
            Jul 29 at 14:13











          • Thanks Amit, It is working perfectly fine.. Ur really a genius.

            – Amy
            Jul 29 at 16:51













          0












          0








          0







          There is another way to can remove the block from the layout.



          Create layout unique handle fro each store like store_en , store_retailer, where to assume that the retailer is the store code of your retailer store & `en is default store code.



          Add custom layout handle using on layout_load_before.



          Observer code



           <?php
          namespace StackExchangeMagentoObserverFrontend;

          class LayoutLoadBefore implements MagentoFrameworkEventObserverInterface

          /**
          * @var MagentoStoreModelStoreManagerInterface
          */
          private $storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )
          $this->storeManager = $storeManager;


          public function execute(MagentoFrameworkEventObserver $observer)

          $layout = $observer->getEvent()->getLayout();

          $handlecode ='store_'.strtolower($this->storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);
          return $this;





          public function execute(MagentoFrameworkEventObserver $observer)


          $layout = $observer->getLayout();
          $handlecode = 'store_'. strtolower($this->_storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);

          return $this;

          }


          After adding this observer, you need to do Cache flush/Di compile.



          Now. if you need to create a handler file at app/code/Vendorname/Module Name/view/frontend/layout/store_retailerSITEStoreCode.xml



          <?xml version="1.0" ?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceContainer name="header.container" remove="true" />
          <referenceContainer name="footer" remove="true" />
          </body>
          </page>





          share|improve this answer















          There is another way to can remove the block from the layout.



          Create layout unique handle fro each store like store_en , store_retailer, where to assume that the retailer is the store code of your retailer store & `en is default store code.



          Add custom layout handle using on layout_load_before.



          Observer code



           <?php
          namespace StackExchangeMagentoObserverFrontend;

          class LayoutLoadBefore implements MagentoFrameworkEventObserverInterface

          /**
          * @var MagentoStoreModelStoreManagerInterface
          */
          private $storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager
          )
          $this->storeManager = $storeManager;


          public function execute(MagentoFrameworkEventObserver $observer)

          $layout = $observer->getEvent()->getLayout();

          $handlecode ='store_'.strtolower($this->storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);
          return $this;





          public function execute(MagentoFrameworkEventObserver $observer)


          $layout = $observer->getLayout();
          $handlecode = 'store_'. strtolower($this->_storeManager->getStore()->getCode());
          $layout->getUpdate()->addHandle($handlecode);

          return $this;

          }


          After adding this observer, you need to do Cache flush/Di compile.



          Now. if you need to create a handler file at app/code/Vendorname/Module Name/view/frontend/layout/store_retailerSITEStoreCode.xml



          <?xml version="1.0" ?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceContainer name="header.container" remove="true" />
          <referenceContainer name="footer" remove="true" />
          </body>
          </page>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 29 at 13:32

























          answered Jul 29 at 12:04









          Amit BeraAmit Bera

          62.8k16 gold badges84 silver badges183 bronze badges




          62.8k16 gold badges84 silver badges183 bronze badges















          • Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

            – Amy
            Jul 29 at 13:20











          • Could you please help me how to resolve this.

            – Amy
            Jul 29 at 13:20











          • Still the same error I am receiving.

            – Amy
            Jul 29 at 14:12











          • Please check your files/folder permission...

            – Amit Bera
            Jul 29 at 14:13











          • Thanks Amit, It is working perfectly fine.. Ur really a genius.

            – Amy
            Jul 29 at 16:51

















          • Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

            – Amy
            Jul 29 at 13:20











          • Could you please help me how to resolve this.

            – Amy
            Jul 29 at 13:20











          • Still the same error I am receiving.

            – Amy
            Jul 29 at 14:12











          • Please check your files/folder permission...

            – Amit Bera
            Jul 29 at 14:13











          • Thanks Amit, It is working perfectly fine.. Ur really a genius.

            – Amy
            Jul 29 at 16:51
















          Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

          – Amy
          Jul 29 at 13:20





          Hi Amit after adding your code I am getting this error Warning: Uncaught Exception: Warning: require(/var/www/html/magento2_dev/pub/errors/report.php): failed to open stream: No such file or directory in /var/www/html/

          – Amy
          Jul 29 at 13:20













          Could you please help me how to resolve this.

          – Amy
          Jul 29 at 13:20





          Could you please help me how to resolve this.

          – Amy
          Jul 29 at 13:20













          Still the same error I am receiving.

          – Amy
          Jul 29 at 14:12





          Still the same error I am receiving.

          – Amy
          Jul 29 at 14:12













          Please check your files/folder permission...

          – Amit Bera
          Jul 29 at 14:13





          Please check your files/folder permission...

          – Amit Bera
          Jul 29 at 14:13













          Thanks Amit, It is working perfectly fine.. Ur really a genius.

          – Amy
          Jul 29 at 16:51





          Thanks Amit, It is working perfectly fine.. Ur really a genius.

          – Amy
          Jul 29 at 16:51













          1














          I would recommend creating a child theme for your retailer site and remove elements accordingly.






          share|improve this answer

























          • Can you share me some examples, how to create a child theme

            – Amy
            Jul 29 at 10:07











          • I have already created a child theme for my main website.

            – Amy
            Jul 29 at 10:07















          1














          I would recommend creating a child theme for your retailer site and remove elements accordingly.






          share|improve this answer

























          • Can you share me some examples, how to create a child theme

            – Amy
            Jul 29 at 10:07











          • I have already created a child theme for my main website.

            – Amy
            Jul 29 at 10:07













          1












          1








          1







          I would recommend creating a child theme for your retailer site and remove elements accordingly.






          share|improve this answer













          I would recommend creating a child theme for your retailer site and remove elements accordingly.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 29 at 9:48









          oliveroliver

          1691 silver badge6 bronze badges




          1691 silver badge6 bronze badges















          • Can you share me some examples, how to create a child theme

            – Amy
            Jul 29 at 10:07











          • I have already created a child theme for my main website.

            – Amy
            Jul 29 at 10:07

















          • Can you share me some examples, how to create a child theme

            – Amy
            Jul 29 at 10:07











          • I have already created a child theme for my main website.

            – Amy
            Jul 29 at 10:07
















          Can you share me some examples, how to create a child theme

          – Amy
          Jul 29 at 10:07





          Can you share me some examples, how to create a child theme

          – Amy
          Jul 29 at 10:07













          I have already created a child theme for my main website.

          – Amy
          Jul 29 at 10:07





          I have already created a child theme for my main website.

          – Amy
          Jul 29 at 10:07

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f283635%2fmagento2-how-to-remove-footer-and-header-for-the-second-store-created%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form