Title: [Plugin: Yet Another Related Posts Plugin] Custom Post Type Support
Last modified: August 20, 2016

---

# [Plugin: Yet Another Related Posts Plugin] Custom Post Type Support

 *  Resolved [Derek Perkins](https://wordpress.org/support/users/ploobers/)
 * (@ploobers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/)
 * Mitch,
 * I have been very impressed with YARPP and have used it religiously on my sites.
   I have also been watching very closely as custom taxonomies have been added and
   more importantly for me, approaching support for custom post types as well. In
   the 3.4.3 changelog, you mentioned “More custom post type support infrastructure”
 * In previous posts, you pointed to a trac ticket that hasn’t been updated.
    [http://plugins.trac.wordpress.org/ticket/1142](http://plugins.trac.wordpress.org/ticket/1142)
   [http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-types](http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-types)
 * I’m just curious, do you have any sort of roadmap or timeline for including custom
   post type support?
 * Thanks,
    Derek
 * [http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/page/2/?output_format=md)

 *  [hnikfazan](https://wordpress.org/support/users/hnikfazan/)
 * (@hnikfazan)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533137)
 * I really would like this functionality as well.
    This is a great plugin that 
   works like a charm.
 *  [onepack](https://wordpress.org/support/users/onepack/)
 * (@onepack)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533143)
 * I don’t want to stop using this great plugin but I have about 8 custom post types
   and the reserved square for Yarpp is scary empty on all of these. 😉
 * Any update?
 *  [onepack](https://wordpress.org/support/users/onepack/)
 * (@onepack)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533144)
 * My idea in single.php to show related content in custom post types because in
   my case the custom post types are like a sort category/ topic and are kinda related.
   Not as good as YARPP but it’s a temporary fix for me.
 *     ```
       <?php $myposttype = get_post_type( $post->ID );
       					if ($myposttype == post){
       						related_posts();
       					}else{
   
       					$the_query = new WP_Query('post_type='.$myposttype.'&post_status=published&posts_per_page=7&orderby=post_date&order=desc');
       			        if ($the_query->have_posts()) { ?>
       			        <ol>
       			        <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
       					<li><a href="<?php the_permalink(); ?>" rel="nofollow"><?php the_title(); ?></a></li>
       			        <?php endwhile; ?>
       					</ol>
   
       			        <?php
       					 }
       					} ?>
       ```
   
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533145)
 * YARPP 3.5 introduces custom post type support. Please download YARPP 3.5b4 and
   check out its readme.txt for details.
 * [http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.3.5b4.zip](http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.3.5b4.zip)
 * I also recently gave a talk on this. Here are the slides:
 * [http://www.slideshare.net/mitcho/relate-all-the-things](http://www.slideshare.net/mitcho/relate-all-the-things)
 * Please do let me know if you run into any issues with CPT support. I’m hoping
   to release 3.5 soon.
 *  [Eizil](https://wordpress.org/support/users/eizil/)
 * (@eizil)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533151)
 * When i try to use the yarpp_related() function, seems no articles is being shown,
   and no message (no related article) been echoed.
 * i just use the CPT function call.
 *     ```
       <?php yarpp_related($post->ID, array(
                         'post_type' => array('mycustompost'),
                       )); ?>
       ```
   
 *  [Eizil](https://wordpress.org/support/users/eizil/)
 * (@eizil)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533152)
 * okay, I think i found out the reason why its happening, the function request 
   for $args first before the post id, i changed the sequence and its working correctly
   now.
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533154)
 * Ah, thank you! This was wrong in the docs but I just updated it for version 3.5.
   🙂
 *  [dannoll](https://wordpress.org/support/users/dannoll/)
 * (@dannoll)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533158)
 * If I have a custom post template, can I display related posts on it using YARPP
   infrastructure? (I read the readme for 3.5b4 and it suggests that I cannot, but
   I wanted to confirm.)
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533191)
 * [@dannoll](https://wordpress.org/support/users/dannoll/), if I understand what
   you’re asking correctly, this is possible. Check out the detailed instructions
   on CPT support in the latest readme.
 *  [Andrea Sciamanna](https://wordpress.org/support/users/sciamannikoo/)
 * (@sciamannikoo)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533198)
 * Why custom post types aren’t listed directly in the settings page?
 * “The pool” shows which posts type are considered.
    By default they are posts 
   and pages.
 * This list could show all custom post types and could change in a checkbox list
   where users can select what should be used to indexing related posts, easing 
   the life to many people (see no coders).
 * Thanks.
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533199)
 * CPTs are in general created using at least some custom coding, so I don’t think
   the extra line of code to add YARPP support is asking too much. If you add `'
   yarpp_support' => true` to your CPT definition, it’ll show up in those settings.
 * Making all custom post types (non-builtin post types) show up and included in
   the YARPP pool would have various unintended consequences in many environments,
   where custom post types are used as a general data store for various applications.
 *  [Andrea Sciamanna](https://wordpress.org/support/users/sciamannikoo/)
 * (@sciamannikoo)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533200)
 * I used to define CPT by code, but found handy the use of other plugins (like 
   WP-Types, for instance).
    I’ve also noticed that a lot of people does the same
   and I don’t think that “CPTs are in general created using at least some custom
   coding” is a completely exact statement.
 * However, I didn’t even ask to have these CPTs enabled by default, but just listed
   in the Pool pane, along with a check box to enable them.
 * It’s just a matter of usability: people that use a plugin to define their CPTs
   wouldn’t be able to add the yarpp_support on their custom post types.
    Just that.
 * Thank you anyway for the answer.
 *  [amit@m-web.com](https://wordpress.org/support/users/amitm-webcom/)
 * (@amitm-webcom)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533213)
 * Hello Mitcho,
 * I am struggling to show my posts from my COSTOM tags/taxonomies. Can you explain
   in brief where i need to add “yarpp_support’ => true” (which explained above)
   to show it up in the settings area.
 * Please let me know if possible…asap.
 * Thanks,
    Amit
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533214)
 * [@amit](https://wordpress.org/support/users/amit/) when you call `register_post_type(
   $post_type, $args )`, `$args` will be an array. Make sure that array has a `yarpp_support`
   key which is set to true. Does that make sense?
 *  [amit@m-web.com](https://wordpress.org/support/users/amitm-webcom/)
 * (@amitm-webcom)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/#post-2533217)
 * Hello Mitcho,
 * Thank you so much for sparing time from you valuable schedule to reply me.
 * Yes, your help did show some required output at the YARPP settings panel but 
   the frontend started showing following improper redirect message when I am trying
   to view any post to check “Slider” in action –
    ********************************************************
   The page isn’t redirecting properly
 * Firefox has detected that the server is redirecting the request for this address
   in a way that will never complete.
 * This problem can sometimes be caused by disabling or refusing to accept
    cookies.*********************************************************
 * Please suggest me how i can enable custom support without any error or issue.
 * Once again thank you very much for considering my question to reply.
 * Thanks,
    Amit

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/page/2/?output_format=md)

The topic ‘[Plugin: Yet Another Related Posts Plugin] Custom Post Type Support’ 
is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [YARPP](https://wordpress.org/support/topic-tag/yarpp/)

 * 22 replies
 * 9 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-custom-post-type-support/page/2/#post-2533225)
 * Status: resolved