Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.