1
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?

asked May 3, 2018 at 19:09

1 Answer 1

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:

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

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.

answered May 3, 2018 at 19:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.