I produced a function that retrieves all parent posts of the publish and i am ordering by publish_date.

select * from {$wpdb->posts} where post_type = 'page' and post_status = 'publish' and post_parent = " . ($parent == 0 ? $page_id : $parent) . ' order by post_date asc

I the Wordpress after sales the posts are purchased in a different way and it is not by publish date nor by ID.

Any idea the way i can order my query to ensure that i'll have a similar order as with the after sales?

Thanks, Radu

Undergo this short article listed here are six methods to personalize the type order of posts in WordPress.

6 Ways to Customize WordPress Post Order

Also must check this out link :

http://wpquestions.com/question/show/id/1009