Jetpack Related Posts – how to exclude multiple categories?
-
Following the instructions at https://jetpack.me/support/related-posts/customize-related-posts/ I’ve added this to my functions file:
function jetpackme_filter_exclude_category( $filters ) {
$filters[] = array( ‘not’ =>
array( ‘term’ => array( ‘category.slug’ => ‘latest-competitions’ ) )
);
return $filters;
}
add_filter( ‘jetpack_relatedposts_filter_filters’, ‘jetpackme_filter_exclude_category’ );However, I’d like to exclude at least 3 categories from ever appearing in Related posts, rather than just ‘latest competitions’. How can I do this?
Many thanks!
Di – https://superlucky.me
- The topic ‘Jetpack Related Posts – how to exclude multiple categories?’ is closed to new replies.