Sorting by post ID – New on top
-
I’m writing an historical journal set in the 1800’s. At the moment I’m posting entries not in chronological order. For instance I might go from 1840 to 1855 then back to 1835. I’ve hacked WordPress so that it it gives me the correct dates etc, but – as you’d expect – the program started slotting each new entry in it’s chronologically correct dated format.
Now the problem with that is that each new entry gets “lost” in the mix and end up not displaying in the order of their WordPress ID. I further hacked my “classes.php” by replacing some of the code with:
$request = ” SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1″.$where.” ORDER BY ID $limits”;
as instructed by one of the posts here. That works as far as I can tell. Now the posts are referenced by their ID numbers on the main page rather than their dates. The only problem is that it lists the older post at the top and the newer posts at the bottom.
In short, is there a way to reverse this so that the newer posts are at the top?
- The topic ‘Sorting by post ID – New on top’ is closed to new replies.