Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active August 29, 2015 14:15
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 neilgee/c91d5afbef7dd6a5dbb0 to your computer and use it in GitHub Desktop.
Save neilgee/c91d5afbef7dd6a5dbb0 to your computer and use it in GitHub Desktop.
Output Genesis Simple Shares via Action Hook and Widget Areas
//* Reposition the Genesis Simple Share buttons
add_action( 'genesis_before_entry', 'wpb_reposition_simple_share_post', 5 );
function wpb_reposition_simple_share_post() {
if( 'post' === get_post_type() ) {
genesis_share_icon_output( 'box', array( 'twitter', 'facebook', 'googlePlus', 'linkedin' ) );
}
}
add_action( 'genesis_after_entry', 'wpb_reposition_simple_share_page', 5 );
function wpb_reposition_simple_share_page() {
if( 'post' === get_post_type() ) {
genesis_share_icon_output( 'box-bottom', array( 'twitter', 'facebook', 'googlePlus') );
}
}
<?php
if ( function_exists( 'genesis_share_icon_output' ) ) {
global $Genesis_Simple_Share;
genesis_share_icon_output( 'aside' , array('linkedin', 'facebook') );//manually add in social
}
?>
<?php
if ( function_exists( 'genesis_share_icon_output' ) ) {
global $Genesis_Simple_Share;
genesis_share_icon_output( 'aside' , $Genesis_Simple_Share->icons );//outputs social shares as defined in plugin
}
?>
//* Reposition the Genesis Simple Share buttons
add_action( 'genesis_entry_header', 'wpb_reposition_simple_share', 5 );
function wpb_reposition_simple_share() {
if( 'post' === get_post_type() ) {
genesis_share_icon_output( 'box', array( 'twitter', 'facebook', 'googlePlus', 'linkedin' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment