i’d like to list my 10 most recent posts but from certain categories only –
anyone can tell me how to do this?
thanks
i’d like to list my 10 most recent posts but from certain categories only –
anyone can tell me how to do this?
thanks
You must be logged in to post a comment.
simply add this above your loop
and you can read more about query_posts Parameters http://codex.wordpress.org/Function_Reference/WP_Query#Parameters
Update
By popular demand 🙂
here is another example to doing the same but using tax_query
Have a look at the category query parameters here:
http://codex.wordpress.org/Function_Reference/WP_Query#Category_Parameters
The easiest way to do this is to have use the category name in the query before the loop starts.
I haven’t tested it but should work.
Also check out http://codex.wordpress.org/Function_Reference/query_posts