WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Yet Another Related Posts Plugin] YARPP with different post types ("portfolio")

[Resolved] [Plugin: Yet Another Related Posts Plugin] YARPP with different post types ("portfolio")

  • altoidboy

    @altoidboy

    I just switched WP templates from one in which all my articles were regular WP posts, over to one where I had to convert them to a custom post type (“portfolio”). I’m trying to figure out how to configure/mod YARPP to still display all related portfolio items at the bottom of a portfolio item, just like it used to when they were regular WP posts.

    I tried reading the documentation but couldn’t understand how to implement this. Any chance anyone can give me some tips?

    Thanks in advance!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author mitcho (Michael Yoshitaka Erlewine)

    @mitchoyoshitaka

    The first step would be to set 'yarpp_support' => true in the code where you’re registering your custom post type, portfolio. Then YARPP will be aware of these posts. Then, in YARPP’s settings, make sure the “cross-relate across all post types” option is set.

    altoidboy

    @altoidboy

    Thanks very much for the reply. I’m not fluent in PHP and I’ve never done this before — but I think I figured some of it out. I did find register_post_type in my functions.php and successfully added this code:

    'yarpp_support' => true,

    and that caused “portfolio” to show up in the YARPP backend.

    I then looked for cross-relate, but couldn’t find it anywhere. I did find “Display results from all post types” so I enabled that. Am I missing this feature somewhere? (I’m running the latest 3.5.3.) Currently, related portfolio items aren’t appearing at the bottom of portfolio items.

    I really appreciate the help!

    Plugin Author mitcho (Michael Yoshitaka Erlewine)

    @mitchoyoshitaka

    Sorry, that’s right; “cross-relate” was recently relabeled “display results from all post types.”

    If you want to display related items on the portfolio pages, you’ll have to add the code related_posts() into your theme’s code for those portfolio pages. Just add it below the_content() and you should be set.

    altoidboy

    @altoidboy

    Got it working! Except I had to use related_entries() since mine are portfolio entries.

    Thanks so much for the help!

    Plugin Author mitcho (Michael Yoshitaka Erlewine)

    @mitchoyoshitaka

    No problem. 😀

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: Yet Another Related Posts Plugin] YARPP with different post types ("portfolio")’ is closed to new replies.