Support

Account

Home Forums General Issues Sort post by time picker field doesn't work Reply To: Sort post by time picker field doesn't work

  • That’s the query:

    SELECT SQL_CALC_FOUND_ROWS wp_gqw8d5_posts.ID FROM wp_gqw8d5_posts INNER JOIN wp_gqw8d5_postmeta ON ( wp_gqw8d5_posts.ID = wp_gqw8d5_postmeta.post_id ) WHERE 1=1 AND ( wp_gqw8d5_postmeta.meta_key = ‘my_date_time’ ) AND wp_gqw8d5_posts.post_type = ‘myposttype’ AND (wp_gqw8d5_posts.post_status = ‘publish’ OR wp_gqw8d5_posts.post_status = ‘acf-disabled’ OR wp_gqw8d5_posts.post_status = ‘private’) GROUP BY wp_gqw8d5_posts.ID ORDER BY wp_gqw8d5_postmeta.meta_value+0 DESC LIMIT 0, 10