• Skip to main content
  • Skip to primary sidebar

Purely Supplemental Hub

Just The Tech, News, and Info We Deem To Post

  • WordPress
  • Marketing
  • Business
  • Computing
  • Security
  • Publicity
  • Resources
  • WHATEVS

Hide Jetpack Sharing Buttons from Specific Categories

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to prevent Jetpack sharing buttons from displaying in specific category archives.

/**
 * Hide Jetpack Sharing Buttons
 */
function jptweak_remove_share() {
	if (in_category(array(xx,xxx,xxx)) ) {
	    remove_filter( 'the_content', 'sharing_display',19 );
	    remove_filter( 'the_excerpt', 'sharing_display',19 );
	    if ( class_exists( 'Jetpack_Likes' ) ) {
	        remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
	    }
	}
}
add_action( 'loop_start', 'jptweak_remove_share' );

Filed Under: Code Snippets Tagged With: Code, Jetpack, Plugins

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

© Copyright Jack Alltrade & Associates 2026 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates