• Resolved jlcota

    (@jlcota)


    Hi,

    With JetPack I filter the post to include in “related post” with this code in functios.hph

    function jetpackme_filter_exclude_category( $filters ) {
        $filters[] = array( 'not' =>
          array( 'term' => array( 'category.slug' => 'oportunidades' ) )
        );
        return $filters;
    }
    add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );

    I’d like to know how can I do the same with de Hueman Theme Related Posts.

    Cheers,

    Jorge

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Jorge. You could copy alx_related_posts() from the parent theme functions.php file to your child theme and add your category filter to the $args array.

    Thread Starter jlcota

    (@jlcota)

    Thanks. It works!

    Cheers,

    Jorge

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filter related posts by category’ is closed to new replies.