• I have a post category with the slug “success”

    I also have this code in my functions.php

    Even though I used the filter in line with jetpack customization guidelines posts in the category “success” still appear in the related posts section.

    I thought it may be a caching or indexing issue but it has been a week with no change and I have re-indexed / cleared cache.

    /*filter out success stories from related posts*/
    function jetpackme_filter_exclude_category( $filters ) {
        $filters[] = array( 'not' =>
          array( 'term' => array( 'category.slug' => 'success' ) )
        );
        return $filters;
    }
    add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );
    
    • This topic was modified 8 years, 1 month ago by jbotte.
Viewing 3 replies - 16 through 18 (of 18 total)
Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘related post category filter not working’ is closed to new replies.