Skip to content

Instantly share code, notes, and snippets.

@billerickson
Forked from chadmohr/widget nav
Created February 11, 2012 01:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save billerickson/1794879 to your computer and use it in GitHub Desktop.
Save billerickson/1794879 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;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment