Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
Last active September 1, 2021 05:08
Show Gist options
  • Save cre8tivediva/dc9e766fc5133e8aff85713f58158b98 to your computer and use it in GitHub Desktop.
Save cre8tivediva/dc9e766fc5133e8aff85713f58158b98 to your computer and use it in GitHub Desktop.
Use Genesis Simple Share with Genesis Blocks Post/Page Grid until Script Error has been fix
/* Set the alignment of the Genesis Simple Share Icons
-------------------------------------------------------- */
.sharre-icon-wrap {
margin: 20px 0;
text-align: center;
}
add_action( 'genesis_entry_content', 'c8d_simple_share_placement', 15 );
/**
* Fixes the JS Error output when using Genesis Blocks Posts and Page Grid. Note in Simple Share, do not set the position
*/
function c8d_simple_share_placement() {
if ( ! function_exists('genesis_share_icon_output') ) {
return;
}
if ( is_home() || is_archive() || is_single() ) {
echo '<div class="sharre-icon-wrap">';
echo genesis_share_icon_output( 'buttons', array( 'facebook', 'twitter', 'pinterest' ) );
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment