WordPress.org

Support

Support » Plugins and Hacks » Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] How to exclude ALL PAGES from coming up as related posts

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

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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).

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] How to exclude ALL PAGES from coming up as related posts’ is closed to new replies.
Skip to toolbar