• Skip to main content
  • Skip to primary sidebar

Purely Supplemental Hub

Just The Tech, News, and Info We Deem To Post

  • WordPress
  • Marketing
  • Business
  • Computing
  • Security
  • Publicity
  • Resources
  • WHATEVS

Add Navigation Bar Widgets to Genesis Child Themes

How to add Primary and Secondary Navigation Widgets to Genesis Navigation Bars.

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to add Primary and Secondary Navigation Widgets to Genesis.

/* Custom Nav right hand side extra */
add_filter( 'genesis_nav_items', 'social_follow_icons', 10, 3 );
add_filter( 'wp_nav_menu_items', 'social_follow_icons', 10, 3 );
function social_follow_icons($menu, $args) {
 $args = (array)$args;
 if ( 'primary' !== $args['theme_location'] )
 return $menu;
 ob_start();
 dynamic_sidebar('Social Icons');
 $social = ob_get_clean();
 return $social . $menu;
}
/* Custom Nav right hand side extra */
add_filter( 'genesis_nav_items', 'google_search', 10, 2);
add_filter( 'wp_nav_menu_items', 'google_search', 10, 2);
function google_search($menu, $args) {
    $args = (array)$args;
    if ( 'secondary' !== $args['theme_location'] )
    return $menu;
    ob_start();
    dynamic_sidebar('Google Search');
    $social = ob_get_clean();
    return $social . $menu;
}
genesis_register_sidebar( array(
	'id'		=> 'google-search',
	'name'		=> __( 'Google Search', 'marketing' ),
	'description'	=> __( 'Primary Navigation Search Box.', 'marketing' ),
) );
genesis_register_sidebar( array(
	'id'		=> 'Social-Icons',
	'name'		=> __( 'Social Icons', 'marketing' ),
	'description'	=> __( 'Secondary Navigation Social Icons.', 'marketing' ),
) );

Filed Under: Code Snippets Tagged With: Code, Genesis Child Theme, Genesis Framework, Layout, Navigation Menus

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

© Copyright Jack Alltrade & Associates 2026 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates