Skip to content

Instantly share code, notes, and snippets.

@wpperform
Created January 4, 2013 12:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpperform/4452264 to your computer and use it in GitHub Desktop.
Save wpperform/4452264 to your computer and use it in GitHub Desktop.
Add a wrapping div around nav in a Genesis child theme
remove_action('genesis_before_header', 'genesis_do_nav');
add_action('genesis_before_header', 'custom_genesis_do_nav');
function custom_genesis_do_nav() {
printf( '<div id="nav-wrap">' );
$nav = wp_nav_menu(array(
'theme_location' => 'primary',
'menu' => 29,
'container' => '',
'menu_class' => genesis_get_option('nav_superfish') ? 'nav superfish' : 'nav',
'echo' => 0
));
printf( '<div id="nav"><div class="wrap">%s</div></div>', $nav );
printf( '</div>' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment