I find that I always, well most of the time, use the header right widget area in Genesis for the Primary Menu of a site and create this menu by adding a Custom Menu to the Header Widget Area, whilst there is nothing wrong by doing it this way, there is a better way.
Here is a guide how to place the Primary Menu in the Header Widget Area by just moving its location there permanently via a Genesis hook. The benefit of doing this is that out of the box the location is set and you have more functionality with registered menus. So to go from this…
To this…
All the code goes in the themes function.php file
You can actually just add the remove_action and add_action functions at the beginning of the code and that alone will reposition the menu. The remove_action moves the menu away completely and the add_action adds it to the new location.
But I also want to modify the output of the menu by removing the wrap element it has by default. This is done by the add_filter function which calls the function below it which in turn modifies or filters attributes of the menu, here just a couple of lines of the original code are left out, lines 89-91 of menu.php in the structure directory.
Add in some CSS
Add to your style.css which reverses the colors of the original menu and also sets the last link to have no padding so it sits flush right and aligns with the content below it.
.nav-primary { background-color:#fff; } .nav-primary li a{ color:#000; } .nav-primary a:hover, .nav-primary .current-menu-item > a { color:#666; } .nav-primary a:last-of-type { padding-right:0px; }