Support » Plugin: Yet Another Related Posts Plugin (YARPP) » Exclude Pages by ID's

  • Resolved mdekievit


    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?

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

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude Pages by ID's’ is closed to new replies.