I know there are a lot of articles and documentation on this but I can't seem to figure it out.
I have a custom post type 'agenda' wich is made for events. I want to sort this by the eventdate. For this, I made a custom field (datepicker) using the ACF plugin.
I've found some documentation on the ACF website wich learned me how to echo the date in dutch format and also an article about sorting the posts by custom meta value. But I can't get it to work.
The key for my custom field is: datum_agenda
Codes I have already tried ( in the $args of the loop):
'orderby' => 'datum_agenda'
'meta_key' => 'datum_agenda', 'orderby' => 'meta_value_num', 'order' => 'DESC'
What am I doing wrong here? Seems like my code can't seem to find my meta_key or something because it still sorts by the autovalue.. (the normal post date)