Skip to content

Instantly share code, notes, and snippets.

@bryanwillis
Forked from srikat/functions.php
Last active January 11, 2016 09:18
Show Gist options
  • Select an option

  • Save bryanwillis/9b57084e222753d5646e to your computer and use it in GitHub Desktop.

Select an option

Save bryanwillis/9b57084e222753d5646e to your computer and use it in GitHub Desktop.
Wrapping Primary and Secondary Navigation in custom divs in Genesis
//* Wrap .nav-primary in a custom div
add_filter( 'genesis_do_nav', 'genesis_child_nav', 10, 3 );
function genesis_child_nav($nav_output, $nav, $args) {
return '<div class="nav-primary-wrapper">' . $nav_output . '</div>';
}
//* Wrap .nav-secondary in a custom div
add_filter( 'genesis_do_subnav', 'genesis_child_subnav', 10, 3 );
function genesis_child_subnav($subnav_output, $subnav, $args) {
return sprintf( '<nav %s>', genesis_attr( 'nav-secondary' ) ) . $menu . '</nav>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment