1

How to add a new header menu in wordpress?

1
  • Could you elaborate on this any? Commented Aug 19, 2010 at 13:24

2 Answers 2

2

You may add a function to wordpress (well anywhere in your theme) using the wp_nav_menu(). This requires that you add the code below to your functions.php file (if you do not have one in your theme directory then create one):

add_action( 'init', 'register_my_menus' );
    function register_my_menus() {
        register_nav_menus(
            array(
            'menu-1' => __( 'Top menu' ),
            'menu-2' => __( 'Bottom menu' )
            )
        );
    }

Change the "Top menu" and "Bottom menu" to what ever you want the names to be. Basically you are just telling wordpress (wp 3.+) to make reservations for these menu in your theme. If you want more you just need to define the names in a new line. Save that.

That done you will need to add the menu in your site template. Usually I define the arguments first before I call the wp_nav_menu() function. Read up on the arguments here http://codex.wordpress.org/Function_Reference/wp_nav_menu

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

-1

You can manage the menus in your WordPress dashboard under "Appearance => Menus". Here is a tutorial: http://en.support.wordpress.com/menus/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.