Home › Forums › General Issues › Using ACF date to sort custom post types not sorting correctly › Reply To: Using ACF date to sort custom post types not sorting correctly
I got:
$args = array(
'post_type' => 'foto_archief',
'orderby' => 'meta_value_num',
'meta_key' => 'date',
'order' => 'ASC',
'posts_per_page' => -1
);
but it only filters on month
so I got first jan
than feb
ect… but the years and dates are all over the place.
My input date is 10/20/2016
and my output date is 24 januari, 2011
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.