Wrap Primary and Secondary Navigation in DIV Using the Genesis Framework
When using the Genesis framework, it is simple to wrap the primary and secondary navigation in a <div>:
To wrap the primary navigation:
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>';
}
To wrap the secondary navigation:
add_filter( 'genesis_do_subnav', 'genesis_child_subnav', 10, 3 );
function genesis_child_subnav($subnav_output, $subnav, $args) {
return '<div class="nav-secondary-wrapper">' . $subnav_output . '</div>';
}