WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
Exclude CPT from being shown in normal Articles (1 post)

  1. Al Bee
    Member
    Posted 11 months ago #

    When I am seeing normal articles, yarpp should show related articles (of all categories). When I am in a custom post type, I only want CPTs as related articles.

    I can achieve the first part of my need by checking the option " Display results from all post types".

    But when I avtivate this option, I get no related articles in my CPTs at all.
    This is how I activated YARPP for my custom post type:

    add_filter('bf_cpt_args', 'bf_cpt_yarpp_support', 10, 2);
    function bf_cpt_yarpp_support($args, $post_type) {
      if ($post_type == 'produkte-dienste') $args['yarpp_support'] = true;
      return $args;
    }

    What can I do next?

    https://wordpress.org/plugins/yet-another-related-posts-plugin/

Reply

You must log in to post.

About this Plugin

About this Topic