Pay money and get answers for your WordPress questions (more info)

Additional main menu to show in header (Sterling WP Theme)

  • SOLVED

The Sterling WP theme supports only 2 menu locations ("main menu" and "footer menu"). I need an additional main menu to show in the header of some pages. What is the fastest, best way to do it?

Answers (5)

2013-01-22

Arnav Joy answers:

you can use following function to register menus

http://codex.wordpress.org/Function_Reference/register_nav_menus

and can use following function to call it

http://codex.wordpress.org/Function_Reference/wp_nav_menu

then you can all it in page and check in which page using following function

http://codex.wordpress.org/Function_Reference/is_page

2013-01-22

Kiet Luong answers:

You can use [[LINK href="http://wordpress.org/extend/plugins/custom-menu-shortcode/"]]Custom menu shortcode plugin[[/LINK]] and add shortcode ( Ex : [custommenu menu=Menu] ) to your pages.

I can help you do it with or without plugin if you want.
skype: [[LINK href="http://www.wpquestions.com/user/profile/id/10125"]]kioluong[[/LINK]]
Regards !

2013-01-22

Francisco Javier Carazo Gil answers:

With Arnav information and this link you will have all you need: http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/

2013-01-22

plovs answers:

To clearify your question: do you want <em>two</em> menus, one under the other, on <em>some</em>? Or do you you want to <em>replace</em> the header menu on some pages?

2013-01-22

Ellah Alzona answers:

Go to your functions.php and add these lines:


register_nav_menu( 'additional-menu', __( 'Additional Menu' ) );


And paste these lines to your header of some pages.


<?php wp_nav_menu( array( 'theme_location' => 'additional-menu' ) ); ?>


You can add custom menu's by going to your dashboard > Appearance> Menus
And thats it all set.