Exclude an entire category from ever appearing among Related Posts results
-
I’m trying to use the customisation of related posts to exclude a category using the code supplied on the help file;
//Jetpack Related Posts function jetpackme_filter_exclude_category( $filters ) { $filters[] = array( 'not' => array( 'term' => array( 'category.slug' => 'blog' ) ) ); return $filters; } add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );
But the category ‘blog’ continues to remain in the results, I have tried other hooks successfully (headline change, remove context) but removing any of the category slugs does not work. Defaulting to 2014/15 themes does not seem to have any effect.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Exclude an entire category from ever appearing among Related Posts results’ is closed to new replies.