WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to grab all posts from an author under category X. Right now, I am using 4 separate loops to do this for 4 different categories. Is there a better way to do this? query_posts

share|improve this question
Do you want to display the results separated per category? – toscho Jun 8 '11 at 7:28
up vote 1 down vote accepted

Have a look at the category parameters of WP_Query

share|improve this answer

Please take a look at this answer, exchange get_comments with get_posts and use the include argument to filter only the posts from the categories you need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.