Hi – I wanted to reverse the order of the timeline so I followed this post here:
https://www.designwall.com/question/how-to-sort-entries-by-date-in-reverse-order-asc/
However when I implemented this fix three things I noticed:
- The list of posts was limited to showing only 5
- It no longer followed the categories so all posts were showing on all pages
- On the homepage the posts from different categories started to get duplicated so the stream would show the same category of posts multiple times
Is there another way to approach this?
Cheers,
Joe
1 Answers
@Joe : Hi, you can add this code to your Functions.php file :
function timeline_query_order($query) {
$query->set('order', 'ASC');
}
add_action('pre_get_posts','timeline_query_order');
Thanks @Allen – That worked. Cheers for the help
Please login or Register to submit your answer