WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mdekievit
    Member
    Posted 1 year 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?

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

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.