Skip to content

Instantly share code, notes, and snippets.

@chadmohr
Forked from billerickson/widget nav.php
Created February 16, 2012 15:47
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 chadmohr/1845817 to your computer and use it in GitHub Desktop.
Save chadmohr/1845817 to your computer and use it in GitHub Desktop.
Genesis widget area next to nav
<?php
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 ( 'primary' !== $args['theme_location'] )
return $menu;
ob_start();
dynamic_sidebar('Social Menu');
$social = ob_get_clean();
return $social . $menu;
}
?>
@chadmohr
Copy link
Author

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 ( 'primary' !== $args['theme_location'] )
return $menu;
$social = dynamic_sidebar('Social Menu');
return $menu;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment