Last active
August 29, 2015 13:57
-
-
Save frankschrijvers/9872361 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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