Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add widget area after .menu in Genesis Primary Nav. Source:
//* Register widget area
genesis_register_sidebar( array(
'id' => 'nav-right',
'name' => __( 'Nav Right', 'genesis-sample' ),
'description' => __( 'This is after .menu in .nav-primary', 'genesis-sample' ),
) );
// Adds widget area after .menu in .nav-primary
add_filter( 'genesis_do_nav', 'sk_do_nav_widget', 10, 2 );
function sk_do_nav_widget( $nav_output, $nav ){
genesis_widget_area( 'nav-right', array(
'before' => '<div class="nav-right widget-area">',
) );
$widget_area = ob_get_clean();
return str_replace( $nav, $nav . $widget_area, $nav_output );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.