Reposition Primary Navigation

Brian Gardner

You may have recently noticed that some of the StudioPress themes have been developed creatively when it comes to primary and secondary navigation menus.

You can blame me for this, but there’s a good reason for it. I don’t think that there are many instances where three menus should be placed on a website.

If you think about it, there are many themes that allow for a menu to be placed in the site header widget area, along with two horizontal locations below that — the primary and secondary navigation.

If you’re using three menu locations, you’re doing something wrong.

There, I said it … and it might sound harsh, but the reality is that three navigation menus is a huge distraction on your website. You can easily place all of your links into two (or even one) menu by using multi-level techniques.

The Alternative Solution

Developing a theme for mass distribution is sometimes a challenge, but there are things I can do to eliminate decisions or possible scenarios.

One of those things is the concept of removing the site header widget area and replacing it with the primary navigation menu. Consider this a method of “forcing” users to display their menu there, and eliminating any other options.

This is also a great solution for developers who build custom sites, and want to remove the possibility of their clients going in there and messing things up.

The first thing you’ll want to do is to remove the site header widget area. Below is the code to remove the widget area in the site header:

By doing this, your client (or any of our users) will no longer see the site header widget area as an option in the Widgets screen of the WordPress dashboard.

The next step is to move the primary navigation into that spot. Below is the code to reposition the primary navigation menu to the site header:

There’s a pretty good chance that you’ll need to do some styling with CSS once you’ve moved the primary navigation to the site header. It might not be much, but there possibly a few tweaks here or there you might consider.

I hope that you enjoyed this Genesis tutorial. I have also published a list of Genesis code snippets, so feel free to use anything you see there.