Home › Forums › ACF PRO › Sorting CPT admin columns by ACF Date Picker › Reply To: Sorting CPT admin columns by ACF Date Picker
ACF stores dates in the database as “YYYYMMDD”, since you are using get_post_meta(), you are bypassing ACF and it will not format you’re dates for you. You’ll need to do this yourself.
To make the columns actually order by this column you need to add a pre_get_posts filter to these posts in the admin, here’s a tutorial I found, and you can probably find others https://wpdreamer.com/2014/04/how-to-make-your-wordpress-admin-columns-sortable/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.