Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I created a page of post. This page, need to load two different categories of posts, interspersed. It would be something like

Category A post post in category B Category A post post in category B

Does anyone know how to do?

thank you

share|improve this question

closed as not a real question by toscho Feb 18 at 23:55

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

You can simply set up a <div> with a <h1> tag that says Category A and then put the query below in that div with the right category name to get posts from that category. Set it up with a different categroy name for the other divs.

if (is_category('category-slug')): 

 query_posts(array('category_name' => 'category-slug', 'posts_per_page' => -1 )); 

endif; 

Source:Wordpress Codex

share|improve this answer

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