Viewing 15 replies - 1 through 15 (of 22 total)
  • I really would like this functionality as well.
    This is a great plugin that works like a charm.

    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?

    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
    					 }
    					} ?>

    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

    I also recently gave a talk on this. Here are the slides:

    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.

    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'),
                    )); ?>

    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.

    Ah, thank you! This was wrong in the docs but I just updated it for version 3.5. πŸ™‚

    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.)

    @dannoll, if I understand what you’re asking correctly, this is possible. Check out the detailed instructions on CPT support in the latest readme.

    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.

    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.

    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.

    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

    @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?

    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)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] Custom Post Type Support’ is closed to new replies.