WP_Query exclude a specific category from posts with subcategories
I cannot figure out why the exclusion of a specific category does not work.
The problem :
I have posts on my site VidYouth, http://www.vidyouth.com/ with various categories and subcategories. I want to exclude the posts from featured category from repeating any other place on the site. (Right now posts are being repeated many times).
When I do a
$my_query = new WP_Query(‘cat=3,-1′.’&showposts=’.$firstcount.”);
I get the posts from category 3 and its subcategories but it DOESNOT exclude from category 1. I have no idea how to fix this.
- The topic ‘WP_Query exclude a specific category from posts with subcategories’ is closed to new replies.