Forums

How do you add a drop down menu to your themes primary navigation (4 posts)

  1. MeltingDog
    Member
    Posted 7 months ago #

    Hi all,

    I want to add a simple drop down menu to my themes primary navigation:

    e.g in the header.php

    <?php wp_page_menu( 'sort_column=menu_order' ); ?>

    But I cant figure out how. All the plugins I've looked at appear to be only for widgets.

    Can anyone point me in the right direction?

    Thanks!

  2. peredur
    Member
    Posted 7 months ago #

    As far as I know, unless someone more knowledgeable than me knows better, you will have to code this yourself (in a Child Theme of course unless you have complete control over the theme) by altering header.php and adding the appropriate CSS rules to your (Child Theme's) style sheet.

    That is, unless your theme already supports drop down menus (like the default themes do), in which case you simply edit your main navigation custom menu in Dashboard --> Appearance --> Menus.

    HTH

    PAE

  3. JerrySarcastic
    Member
    Posted 7 months ago #

    I would also go the Custom Menu route (built into WordPress 3.x) if your theme supports it, which most up-to-date ones do.

    Here's a video on how to set it up with your theme. Way easier than messing with your theme files.

  4. MeltingDog
    Member
    Posted 7 months ago #

    Thanks guys,

    I did the custom menu way and altered my header file. The theme I have is one I built myself and was missing that newer addition allowing for custom menus.

    If anyone else is having this issue I found this article helpful:

    http://kav.in/wordpress-dropdown-menu-wp-nav-menu-css

Reply

You must log in to post.

About this Topic