I need to get all posts via the wordpress loop but i need them to be grouped by category and cronological within each category. Anyone know how I should go about this?
Thanks!
I need to get all posts via the wordpress loop but i need them to be grouped by category and cronological within each category. Anyone know how I should go about this?
Thanks!
You must be logged in to post a comment.
You can use a new WP query to grab posts by category and display them chronologically from newest to oldest or otherwise. This works in the standard WP loop in a page template (or in the post/page editor if php execution is enabled), and can be used any number of times in the loop without conflicting with other queries. Change “mycategory” to your own category and change showposts=1 to the number of posts to show, or -1 to show all.
Function Reference/WP Query « WordPress Codex
Look at this
If this doesn’t sort chronological in each, then you’ll just need to add the “post_date DESC” to the appropriate query.