Home › Forums › General Issues › Loop issue with checkbox › Reply To: Loop issue with checkbox
Thank you for your reply, unfortunately with this info i could’t fix the problem. I understand that I’m already in the loop so it works just with the first post. But the situation where i’d like to get to is if the first post doesn’t have the checkbox ‘featured’ activated, it skips to the next post down the line to see if it’s activated there and then output the result. I know of the posts_per_page -1 showing all posts, but i want the latest possible post that has the checkbox featured activated ( only show 1 post). So i guess i need some form of check included in the loop to check for the ‘featured’-value of the checkbox and if a post doesnt have that value it moves to the next post to see if it has and output that post instead.
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.