Post order by ID number problem
-
I found a bit of code in another thread, that was to order your posts by their ID number, which is exactly what I wanted. By just adding this line of code to the ‘classes.php’
$request = ” SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1″.$where.” ORDER BY ID $limits”;
This worked fine, other than at the bottom of my posts I am now getting this error come up:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
SELECT COUNT(DISTINCT ID) FROMDoes anyone have any idea at all, or a better or simple way to arrange my posts in the order of their ID number?
The topic ‘Post order by ID number problem’ is closed to new replies.