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; }