Skip to content

Instantly share code, notes, and snippets.

@chaselivingston
Created January 11, 2016 18:52
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 chaselivingston/6dca7b7c61ca197435db to your computer and use it in GitHub Desktop.
Save chaselivingston/6dca7b7c61ca197435db to your computer and use it in GitHub Desktop.
<?php
function jetpackme_no_related_posts( $options ) {
if ( in_category( array( 4, 10 ) ) ) {
$options['enabled'] = true;
} else {
$options['enabled'] = false;
}
return $options;
}
add_filter( 'jetpack_relatedposts_filter_options','jetpackme_no_related_posts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment