0

I tried to remove or hide the category list on header in login page only. How can i do it? I don't see anything in customer login layout that generate the catalog list.

  • do you want to remove the menu – Arun Karnawat Jan 31 '18 at 6:46
  • by category list do you mean header navigation menu? – Piyush Jan 31 '18 at 6:47
  • @ArunKarnawat just hide it in login page.@Piyush it's category that we can add from the backend Catalog > Ctegories. – Edwin Widhiyanto Jan 31 '18 at 6:48
2

Add below code in your customer_account_login.xml

<referenceBlock name="navigation.sections" remove="true"/>
1

If you want to remove top navigation menu for category from header in login page then follow below steps:

Create customer_account_login.xml app\design\frontend\PackageName\ThemeName\layout paste below code into file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog.topnav" remove="true"/>
    </body>
</page>
1

To hide the Navigation menu only in Login Page, override layout file

 \vendor\magento\module-customer\view\frontend\layout\customer_account_login.xml

in you theme at

\app\<Vendor>\<ThemeName>\Magento_Customer\layout\customer_account_login.xml

and add

<referenceBlock name="navigation.sections" remove="true"/>

just before closing body tag </body>

Do not Edit Core file as changes may be removed when you upgrade Magento version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.