Skip to content

Instantly share code, notes, and snippets.

@frankschrijvers
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankschrijvers/9872361 to your computer and use it in GitHub Desktop.
Save frankschrijvers/9872361 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'nav-social-menu',
'name' => __( 'Social Menu', 'themebuilder' ),
'description' => __( 'The place for Simple Social Icons widget.', 'themebuilder' ),
) );
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );
function sws_social_icons($menu, $args) {
$args = (array)$args;
if ( 'secondary' !== $args['theme_location'] )
return $menu;
ob_start();
genesis_widget_area('nav-social-menu');
$social = ob_get_clean();
return $menu . $social;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment