[Resolved] How to exclude a category ? Pls help !
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.
Have you tried changing YARPP options? Namely, “Relatedness options” and pick “Categories: require at least one category in common”.
@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.
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..
How can I exclude them manually ? http://wordpress.org/support/topic/exclude-category-7
@polle001 do you want to avoid displaying results for posts of a particular category, or avoid showing posts in a particular category as “related”?
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.
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.
- The topic ‘[Resolved] How to exclude a category ? Pls help !’ is closed to new replies.