I've only a little space for horizontal category navigation bar on the top of my theme and I have to limit quantity of groups proven about this bar and tell WordPress put "More.." like a drop lower menu link in the finish from the list to allow customers hover their mouse cursors on that to determine other groups as proven in screenshot.
How do i do this?
I suppose you're using wordpress version 3+.
This really is most likely not the cleanest way but should work:
- Register a custom menu for your template. Watch the 'depth' parameter (since you want the 2nd level)
- Visit 'Appearance - Menus'
- Produce a Custom Menu
- Produce a 'Custom Link' known as 'More...'
- add the 'More...' Link to another groups as sub-groups towards the menu.
- write your CSS code to simply display the 2nd level on hover.
However, I am unsure if you would like the 'More..' food selection to become a linkpage/category. All that's possible, just add the courseOrweb page rather than the 'Custom Link'.
Hope this workaround can solve your condition.
Is dependent on which function you are using to format the navigation menu. It's most likely
wp_list_categories() which is probably not the best option inside your situation. As @Andre pointed out in the answer, you might like to opt for navigation menus available since WordPress 3, but when you have to stay with groups, try
get_categories() that will return the groups inside a non-formatted way. This will allow you to loop through them by any means that you would like, incorporate a counter to limit the overall output, after which loop with the relaxation underneath the More submenu.