In my WordPress plugin I am getting posts using the following:
$args = array(
'post_type' => 'wpplugin_pp_order',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'ID'
);
$posts = get_posts($args);
The problem is the result is returning like so for the post_id:
3000
3001
3002
3003
2999
2998
How can I put the result the correct order?
Found a solution to this problem - (seems like others are also having the same problem - Wordpress get_posts attachments orderby)
The problem is caused by the usort function that extends wp_list_table class. I like most others got this from some online example (everyone seems to be using the same code):
To fix the problem, simply put an if statement around it: