Skip to content

Instantly share code, notes, and snippets.

@nikolov-tmw
Created July 18, 2014 15:42
Show Gist options
  • Save nikolov-tmw/c25ddbde1f51eec88d7d to your computer and use it in GitHub Desktop.
Save nikolov-tmw/c25ddbde1f51eec88d7d to your computer and use it in GitHub Desktop.
Disables displaying of the social sharing buttons by the "Tweet, Like, Google +1 and Share" plugin on specific page templates
<?php
add_action( 'template_redirect', 'maybe_disable_social_buttons' );
function maybe_disable_social_buttons() {
if ( is_page() && 'no-social-page.php' == get_page_template_slug( get_the_ID() ) ) {
remove_filter( 'the_content', 'disp_social',1 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment