Add Another Navigation Bar

Place this code in the functions.php file to add another navigation area to your website

1
2
3
4
5
6
7
8
9
add_action( 'init', 'mk_nav_menu' );
 
function mk_nav_menu() {
	register_nav_menus(
		array(
			'header-sector-menu' => __( 'Header Sector Menu' )
		)
	);
}


Note: replace 'header-sector-manu' and 'Header Sector Menu' with anything you like.

This will create the navigation menu and you will be able to see it in your Dashboard > Menu area at the top left of the page.

You now have to place it in a template or use a function to do so. Find the place in the header.php where you want to put the menu and paste in:

1
<?php wp_nav_menu (array ( 'theme_location' => 'header-sector-menu') ); ?>

If you want to do it from the functions file you will have to find the hook used by your particular theme for the area where you want to place it. In Woo themes I used:

1
2
3
4
5
6
7
<?php
add_action( 'woo_nav_after', 'second-nav-menu' );
 
function nav_container_end() { 
	wp_nav_menu (array ( 'theme_location' => 'header-sector-menu') );
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *

Message
Your Name *
Your Email *
Website

Contact us

Contact us about LoudFeed services

Get in touch with us

Name: Loud Feed Services Administrator
Address: Brooklyn, NY
×
20126155