Last active
September 1, 2021 05:08
-
-
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
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
/* Set the alignment of the Genesis Simple Share Icons | |
-------------------------------------------------------- */ | |
.sharre-icon-wrap { | |
margin: 20px 0; | |
text-align: center; | |
} |
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
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