Hi, I’ve selected megemenu for my main categories but is there any way of excluding some sub categories from displaying, or at least showing the hierarchy of second and third level categories?
For example, if I have categories of:
Film > Film Reviews > Action films
But I only want Film and Film Reviews to show in the megemenu, not Action films as well. Is this possible?
Hi
To exclude some specific categories from mega menu add this line of code 'exclude' => '31, 32' in td_block_mega_menu.php like here: http://screencast.com/t/gLk8sgvLA and replace the initial numbers with the category’s id which you want to exclude from menu.
To get the category id please follow this link: http://screencast.com/t/fKn2qrSQ
Let me know how it goes.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hi
Please make sure that you add the comma here: http://screencast.com/t/HCBO5mpujE86 then test again.
Thanks!
Thanks, it was that missing comma. That’s worked now!
On a related note, is there a way to prioritise the order the categories appear in the meganav?
As a feature suggestion for future releases, I would like more flexibility to control what goes in the meganav, as I tend to customise my menus quite a lot but this is difficult if you want to use the meganav as well when it relies on the standard category/sub-category structure.
Thanks
Hello,
Unfortunately you cannot apply a custom sorting order easily. You will have to change the functionality of the mega-menu for that. You can however change the ascending or descending order by editing td_block_mega_menu and adding this line: 'order' =>'DESC' or this one: 'order' =>'ASC' like so: http://screencast.com/t/45zdwgQ2Sx
I hope this helps
+1 for the logic being tightened up on this in the Theme panel.
There needs to be a Menu setting that allows users to toggle the display of just second level sub-categories (which should be the default) or all sub-categories 0 as it is today. This workaround is a little messy.