Yet Another Related Posts Plugin (YARPP)
[resolved] YARPP and Custom Post Type with Types/Views (3 posts)

  1. battra
    Posted 3 years ago #

    Just want to post the solution of integrating YARPP and CPT created using Types. Quoted from their support forum:

    Please try Types fiter hook "wpcf_type", like this:
    add PHP codes in your theme/functions.php

    add_filter('wpcf_type', 'yarpp_support_func', 10, 2);
    function yarpp_support_func($data, $post_type)
        if(in_array($post_type, array(
            $data['yarpp_support'] = true;
        return $data;

    Please replace "my-post-type-one" and "my-post-type-two" with your custom post type slugs

    This works for me and I can see my custom post type checkbox in YARPP setting page. HTH!

    Source: http://wp-types.com/forums/topic/related-posts/


  2. jeffparker
    Plugin Author

    Posted 3 years ago #

    Glad that worked for you, battra!

  3. nemoprofeta
    Posted 3 years ago #

    Thanks for the code. I tried it on a blog using Custom Post Types UI but it didn't work. Should it work as it is or should I modify it?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic