/ Published in: PHP
[register_nav_menus](http://codex.wordpress.org/Function_Reference/register_nav_menus,"register_nav_menus")
[wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu")
[in_category](http://codex.wordpress.org/Function_Reference/in_category,"in_category")
[is_category](http://codex.wordpress.org/Function_Reference/is_category,"is_category")
[wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu")
[in_category](http://codex.wordpress.org/Function_Reference/in_category,"in_category")
[is_category](http://codex.wordpress.org/Function_Reference/is_category,"is_category")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // add the following to wp theme function.php 'primary-menu' => 'main menu', 'marketing-menu' => 'marketing menu', 'shopping menu' => 'shopping menu', 'technology menu' => 'technology menu', 'recreation menu' => 'recreation menu', ) ); add_action( 'init', 'register_nav_menus' ); ?> <?php // add following to where you want the menu share, in my case, hearder.php <?php 'theme_location' => 'marketing-menu', 'container' => '', 'menu_id' => 'primary-nav', 'container_class' => 'main-menu', 'menu_class' => 'nav' )); } else(has_nav_menu('primary-menu')){ 'theme_location' => 'primary-menu', 'container' => '', 'menu_id' => 'primary-nav', 'container_class' => 'main-menu', 'menu_class' => 'nav' )); ?>