Oke nevermind, I finally got it to work, like i said, solutions often are in a small corner.
'post_type' => 'nieuws', 'posts_per_page' => 1, 'orderby' => 'date', 'order' => 'DESC', 'meta_query' => array( array( 'key' => 'featured', 'compare' => 'LIKE', 'value' => 1 ) )
I changed the compare from ‘=’ to ‘LIKE’. I don’t understand the reason why ‘=’ doesn’t work and ‘LIKE’ does, but atleast it solved the problem!
Thanks for the support Enorog!
Fijne dag verder 🙂
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!
© 2023 Advanced Custom Fields.