Answer the question
In order to leave comments, you need to log in
How to sort by updating records?
I'm moving from DLE to WordPress and faced such a problem, after updating the post (adding text or changing it), the post remains the same as it was last week's date. But in DLE, the date + time is set at the time the record is updated - which is convenient and the record itself rises to the very top.
How can this be done in WordPress. So that, by default, topic entries are sorted by date + time of modification.
Answer the question
In order to leave comments, you need to log in
A simple solution to sort by date modified is:
$the_query = new WP_Query( array(
'post_type' => $post_type,
'orderby' => 'modified',
'order' => 'DESC',
));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question