follow mejoin mesubscribe

Design adjustments and the Genesis Primary Navigation Option

When the Genesis Theme Framework primary navigation menu is not selected for display in Theme Settings, a design may not properly display because the navigation menu normally takes up space. And, while on most sites a primary navigation will be displayed, it may not always be true. This is especially important to consider when developing Genesis Child Themes.

I deal with the problem by adding a new body class if the Include Primary Navigation Menu? option is not checked under theme options.

add_filter( 'body_class', 'dream_include_nav_replace_css' );
/**
* Include no-nav body class if nav not checked
*
* @author Jen Baumann
* @link http://dreamwhisperdesigns.com/?p=714
*
* @param array $classes Existing body classes
* @return array Amended body classes
*/
function dream_include_nav_replace_css( $classes ) {

	if ( '1' != genesis_get_option( 'nav' ) )
	$classes[] = 'no-nav';

	return $classes;

}

You should add this anywhere after this line: require_once(TEMPLATEPATH.'/lib/init.php'); but before the final ?> tag at the end of the file.

The next step is to adjust margin or padding of either the header or the #inner container. In my latest design, I used simply this:

.no-nav #header {
	padding: 0 0 42px;
	}
About Jennifer Baumann

I am an avid horseback rider, animal lover, and freelance designer. I love working with WordPress and Genesis and work for Copyblogger Media as a Technical Support Advocate.

Dream Whisper Designs is Powered by Genesis

StudioPress Premium WordPress Themes

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.