Home › Forums › General Issues › Loop issue with checkbox › Reply To: Loop issue with checkbox
That way of putting it in the query from the start is the first thing i tried to tackle this problem when it arose.
$args = array (
'post_type' => 'nieuws',
'posts_per_page' => -1,
'orderby' => 'date',
'order' => 'DESC',
'meta_key' => 'featured',
'meta_compare' => '=',
'meta_value' => 'featured'
);
I tried changing the meta_value to 1 like in your example, I tried to change the values for the checkbox itself in the admin panel, but some how it just doesn’t want to show any post, even if i set the posts_per_page to -1 just for testing purposes. And this got me looking to other solutions like in my first post. I know there is something wrong with the meta_value bit of the query, I tested if the meta_key on its own works and it does. The solution may well be in a small corner, but I just can’t figure it out hehe…
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.