I am figuring out a way if we can manage the menu in such a way that when I click on the menu item in the first menu, the sub categories or links that i choose should be displayed in the secondary menu.. say for example when I click on Entertainment in the nav menu, the subcategories/topics like gossips, hollywood, bollywood should be appear in the menu beneath the primary menu… (eg.. have a look at ibnlive.com or latimes.com website, it works in a similar passion)…
Leave a Reply
You must be logged in to post a comment.
You can do this one of three ways:
Hope that helps a bit more.
I’ve done this on numerous sites but my implementation is via only ONE menu with the help of CSS. (You can also use JavaScript for some cool effects.)
Under Appearance -> Menus, I create one menu and drag submenu links under their ‘parent’ link in that one menu. (The beauty of this solution is that it is simple, and if you needed to add a third level in the future, it wouldn’t require that much additional work.)
Then I use CSS to style these. When you are on a page, WordPress will use a ‘current’,’parent’, or ‘ancestor’ menu item class. These can be used to display the appropriate menu. And you will also take advantage of the ‘:hover’ pseudo class to display the appropriate submenu on hover. You can also opt for jQuery’s
show()
andhide()
methods if you want to incorporate some slick JS animation.It would take a bit of work to output all of the appropriate CSS and jQuery here, so I hope this points you in the right direction.