The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Yet Another Related Posts Plugin (YARPP)
[resolved] Exclude Pages by ID's (2 posts)

  1. mdekievit
    Posted 3 years ago #

    Hi Michael,

    First of all: great plugin!
    I'm working on a website that is page orientated. The posts are only used for blog items. I have a small challenge to exclude page ID's from the related page results. Certain pages keep popping up in the results.

    I read some WP blog posts that you advise to use a tag or category for this but unfortunately thats is not an option for me. I don't want to install extra plugins to use tags and categories on pages and use extra tags or categories only for this purpose.

    I'm using a custom template to display the related pages. Is it possible to use the 'exclude' argument for this within the custom YARPP template? Or is there another way?


  2. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 3 years ago #

    If you're using a custom YARPP template, you can definitely filter those out. In your loop where you go through the related posts, you can check get_the_ID() and see if it's one of those IDs you want to filter, and not print anything in that case.

    Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.