Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active February 26, 2016 14:02
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 srikat/441ffbbcb92e0e370c2a to your computer and use it in GitHub Desktop.
Save srikat/441ffbbcb92e0e370c2a to your computer and use it in GitHub Desktop.
How to display Social Warfare sharing buttons when content limit is set in Genesis. https://sridharkatakam.com/how-to-display-social-warfare-sharing-buttons-when-content-limit-is-set-in-genesis/
// Display Social Warfare sharing buttons below content when content limit is set
add_action( 'genesis_entry_content', 'sk_social_warfare' );
function sk_social_warfare() {
// if we are on a single page, abort.
if ( is_singular() ) {
return;
}
// if Social Warfare plugin is active, display its sharing buttons
if ( function_exists( 'social_warfare' ) ) {
social_warfare();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment