query_posts loop through taxonomy and posts separately
-
Hi, I have a custom post type with a taxonomy and several categories, with posts saved to each category. I want to create a page template that loops through the categories in turn, listing each post, like this:
<h3>Custom Category One</h3> <ul> <li>Custom post 1</li> <li>Custom post 2</li> <li>Custom post 3</li> </ul> <h3>Custom Category Two</h3> <ul> <li>Custom post 4</li> <li>Custom post 5</li> <li>Custom post 6</li> </ul>I can use
query_poststo fetch all the custom posts and spit them out in one long list, but how do I loop through the categories one by one? Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘query_posts loop through taxonomy and posts separately’ is closed to new replies.