WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] How to exclude ALL PAGES from coming up as related posts (3 posts)

  1. lhutt
    Member
    Posted 2 years ago #

    I have the latest version of YARPP (3.3.2)

    I am having trouble figuring out how to limit the related posts to only be posts and not pages.

    My goal: I want to show only related posts on a page - not other pages. I have turned on the cross-relate posts/pages so that blog posts will show up on the related pages but can't figure out how to keep pages from showing up.

    Any suggestions other than installing another plugin to add categories/tags to pages and then excluding the category/tag added to the page from the Pool?

    If it requires a small modification to the plugin code, I can handle that.

    Thanks!

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

  2. chadrew
    Member
    Posted 2 years ago #

    I'm probably late, but you could use YARPP custom templates feature, and simply filter out the pages and leave only posts.

    I do something similar, since my posts are about upcoming events and I want only future events to be shown (not the ones which have ended already) so I filter them out by custom fields.

    One problem with this approach is that if you have YARPP set to show 3 related posts, and the related entries are like this:

    1. page
    2. post
    3. page

    Only 1 post will be shown. I've had to increase YARPP related post number to 20 or so (since most of them will be filtered in the custom template).

  3. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    I would suggest @chadrew's solution. Here's a tutorial on custom YARPP templates: http://mitcho.com/blog/projects/yarpp-3-templates/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic