[Resolved] wp_query ordered by post ID but not date
I’m setting up a website for the distribution of audio lectures. I’m using ‘date’ to show the date of recording, not the date of posting. However, I also want a ‘latest posts’ custom query – ie. I need a way to order the posts by post_id instead of date.
I’m using the following to set up my ‘latest posts’ loop:
<?php $custom_loop = new WP_Query('showposts=10&cat=-167&orderby=id&order=DESC'); ?>
All of the above arguments work, except ‘orderby=id’. How would I get the posts to be ordered numerically by ID?
- The topic ‘[Resolved] wp_query ordered by post ID but not date’ is closed to new replies.