Support » Themes and Templates » Add Categories drop down to menu nav

  • jimmypader


    I want to add a drop down menu to the nav bar.
    I currently am using a wordpress menu (appearance>menus) with custom css.

    I want to add another item named ‘Products’. I want it to display the categories.

    It would function much like the categories widget. Check box to ‘Display as Dropdown’. ‘Title’ box so I can rename it.

    Is this possible?

    If not, I will probably turn off the menu and hard code something into header.php.

    Here’s my site about mountain laurel handrails

Viewing 11 replies - 1 through 11 (of 11 total)
  • Megan Goodson


    It is very possible, in fact I just implemented one myself for a company website. It’s very easy to do. Go back to your “menu’s” and make a new one and underneath the box where you’d usually add pages into the menu should be a box that says or lists your categories. 🙂 Then you just check the boxes beside the categories you want added and click add (the same way you’d add a page to a menu). Then go to your widgets page and make a new navigation widget using your newly created category driven menu! 🙂

    I hope this helps. If not I can try and put some pictures with it!

    Good Luck



    Forum Moderator

    Um – I think jimmypaderwants to display a single custom nav menu and then a category dropdown as well. In theory, that’s possible too if you add a widget-ready area to the right of your nav menu block and then use the Category widget from Appearance->Widgets.



    yes esmi. that is what I had in mind.

    but it appears a little more complicated than I had in mind.

    I’d like the category drop down to be part of the custom menu.
    This functionality does not appear to exist currently.

    If I added a widget area to the right of the nav I’d have to style it as well to match the actual nav menu…

    I was playing last night with hard coding the nav bar into the header.php and using something like the below to call the categories. I didn’t get through fixing the css but this seems to have a good chance of working.

    what do you think?

    <li id="products"><?php _e('Products:'); ?>
    <?php wp_list_cats(); ?>


    Forum Moderator

    Does your current custom menu support dropdowns at all?



    using modified 2010

    I do not see any dropdown functionality



    Forum Moderator

    Thinking on this some more…

    If I added a widget area to the right of the nav I’d have to style it as well to match the actual nav menu

    If you are comfortable tweaking CSS, that should be a relatively trivial job (for various definitions of the word “trivial”).

    I was playing last night with hard coding the nav bar into the header.php

    Why not use wp_dropdown_categories and let WP do the drudge work?



    Forum Moderator

    using modified 2010

    I do hope that this is a child theme…

    I do not see any dropdown functionality

    The original Twenty Ten theme menu supports dropdowns. Try adding a sub-page to your current custom nav menu and you should see what I mean.


    I have a similar issue. I have a client that I designed and built a WordPress site for, using a modified theme a few years ago. I think that may have been the TwentyTen theme. Today he emailed me asking if I could have his blog categories listed as a drop-down menu from the blog link on the main navbar. I know how to add pages as a drop down, by choosing a parent page, but I have no idea how to add a list of his blog categories as a drop-down on his navigation bar.

    I thought that maybe custom menus would save me, but under Appearance/Menus, I am seeing the following notice:

    The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.

    I looked at the wp_dropdown_categories, but I’m not sure this will do what I need, or if it will, how to implement it. Any advice on how I might go about adding categories as a drop down from the navbar (preferably under the blog menu item on the navbar).

    Thanks in advance!

    Deirdre, I ended up doing it in html and css
    if you go to my site, you can see the html and css under:: div id=”nav”.

    this was much easier to me than the wp_dropdown_categories call because I still had to style the call and its output.

    Thanks Jimmy – I’ll take a look!

    I ended up adding a function to enable custom menus for the theme, then created the new menu items and drop downs through Appearance/Menus. Finally, I renamed the elements in my CSS to match the classes and IDs for the new menu.

    Here’s the code I added to function.php

    add_action('init', 'register_custom_menu');
    function register_custom_menu() {
    register_nav_menu('custom_menu', __('Custom Menu'));

    Hat tip to: Think Vitamin

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Add Categories drop down to menu nav’ is closed to new replies.