WordPress.org

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] Exclude When In Multiple Categories (2 posts)

  1. Jennifer
    Member
    Posted 2 years ago #

    I have a post in two categories - "Sponsored" and "Recipes".

    Because it is a sponsored post, I do not want related posts showing up, so I have YARPP set to exclude all posts in "Sponsored".

    However, this post is also in the "Recipes" category, so related posts are showing up. I need it in the Recipes category, so that it shows up on that page, but I do not want related posts showing up, as it is in the "Sponsored" category as well.

    Thanks!

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

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    "Excluding" Sponsored in YARPP's "the pool" options means that anything in "Sponsored" will not show up as a related post.

    For what you want to do, I think you will want some custom code in your theme. Turn off the "automatic display" option in YARPP settings, then call related_posts() in your theme. You'd have to write some code so that you can check that if it's in Sponsored, no matter whatever categories it has, it will call related_posts(). Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic