Skip to content

Instantly share code, notes, and snippets.

@pmciano
Created March 9, 2017 14:28
Show Gist options
  • Save pmciano/636ba4ae4002ca5b0a68a5b8a5d92a1e to your computer and use it in GitHub Desktop.
Save pmciano/636ba4ae4002ca5b0a68a5b8a5d92a1e to your computer and use it in GitHub Desktop.
Remove craft Category From Related Posts
function jetpackme_filter_exclude_category( $filters ) {
$filters[] = array( 'not' =>
array( 'term' => array( 'category.slug' => 'craft' ) )
);
return $filters;
}
add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment