Magento 1.9.1
Porto theme

We have a massive categories' menu bar at the top of the website with 14 long category names. It is taking way too much real estate space and we don't really need it other than on the front page. How can we hide it in all subsequent pages?

1 Answer 1


You could use layout XML to remove it from all pages, then add it again for just the homepage by either using the section under Admin->CMS->Pages->Edit->Design->Layout Update XML or by adding it to your local.xml using the handle <cms_index_index>.

In your theme's local.xml file:

    <reference name="top.menu">
        <action method="unsetChild"><name>catalog.topnav</name></action>
    <reference name="top.menu">
            <label>Navigation Bar</label>
            <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml" />

This may have some debugging issues in regards to your custom theme. If so, turn on template hints to find the name of the file your menu is using, and you should be able to find similar layout instructions under app/design/frontend/your/theme/layout/SOME-FILE.xml, and you can change the name and/or template file appropriately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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