Navigation Location

The Navigation Location option can be found in Appearance > Customize > Layout > Primary Navigation. Prior to GP 1.3.42, it was named Navigation Position.

This option allows you to move your primary navigation to different areas on your website.

Each name is pretty self explanatory – simply select each option and you’ll see your navigation move instantly.

Of course, if you choose either of the sidebar options, that sidebar must be view-able on the page to see your navigation.

Navigation Drop point

One of the issues we see a lot is when the navigation is aligned right (or left), and the browser isn’t wide enough to fit the logo and navigation on one line.

To combat this, we’ve added a new option which allows you to specify a width at which point the navigation will drop down onto its own line and center.

Choosing your navigation location with a function

In some cases, you may need to change your navigation location a specific page, category etc..

There’s a filter available that allows you to do this:

add_filter( 'generate_navigation_location','tu_move_navigation' );
function tu_move_navigation( $location )
{
	if ( is_front_page() ) {
		return 'nav-float-right';
        }

	if ( is_archive() ) {
		return 'nav-below-header';
        }
	
	return $location;
}

You can use any of the available  WordPress conditionals to determine which location your navigation will be moved to.

In the function above, I’m using  is_front_page() and is_archive() as examples.

These are the available IDs you can return:

nav-below-header
nav-above-header
nav-float-right
nav-float-left
nav-left-sidebar
nav-right-sidebar

If you want to remove the navigation from a page, simply return empty single quotes:

return '';

Learn how to add PHP here.