WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] How to exclude a category ? Pls help ! (14 posts)

  1. ezzal
    Member
    Posted 3 years ago #

    Hi,

    I use Yarpp, and love it !

    Its simply great,

    But I want a small featured.... in my site I have both 'Pictures' , "Videos" posted under 2 Main categories..

    How can I tell yarpp to avoid matching a category with another category ?

    I want the pictures to show related posts under pictures category only.

    Thanks.

  2. ezzal
    Member
    Posted 3 years ago #

    Anyone please ?

  3. chadrew
    Member
    Posted 3 years ago #

    Have you tried changing YARPP options? Namely, "Relatedness options" and pick "Categories: require at least one category in common".

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    @ezzal the best way to do this is to turn off "automatically display" in YARPP's display options, then call the code related_posts() in your theme, under where you display the content, and to wrap that in a conditional so that it's only triggered if you're displaying something in the appropriate category. Needless to say, you'll have to do that in PHP. Hope that helps.

  5. ezzal
    Member
    Posted 3 years ago #

    Thanks for your replies.. and your time.
    mitcho - Your idea seems simple and great !

    I can't use the basic options in plugin because I have lot of sub categories under every main categories.

    This is my site : http://www.ezzal.com/

    I have both GAMES, PICTURES.. as main category

    and GAMES category have : action, arcadem, puzzle, etc sub categories.. etc

    Thanks ! I can solve this now..

  6. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    No problem!

  7. polle001
    Member
    Posted 3 years ago #

    How can I exclude them manually ? http://wordpress.org/support/topic/exclude-category-7

    Thanks.

  8. polle001
    Member
    Posted 3 years ago #

    mitcho, can you please help ?

  9. polle001
    Member
    Posted 3 years ago #

    If anyone else can help I'll appreciate that.

    Thanks.

  10. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    @polle001 do you want to avoid displaying results for posts of a particular category, or avoid showing posts in a particular category as "related"?

  11. polle001
    Member
    Posted 3 years ago #

    Avoid displaying results for posts of a particular category.

    Lets say I don't want the category "cars" to display at all in the related ones. As I have it with a special style, it breaks everything in the related section, so I need to exclude that category from the related posts.

    Thanks.

  12. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    You can exclude particular tags and categories from the "The Pool" options in the YARPP options screen. If you don't see those settings around, you can make them appear by going to the "screen options" tab in the top right.

  13. polle001
    Member
    Posted 3 years ago #

    Yep, I was not seeing them. Thanks !

  14. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic