Home › Forums › General Issues › Loop through all posts, display if field = x › Reply To: Loop through all posts, display if field = x
A few tips:
In the future, if your topic is a question, please do not mark it as a post. Can you please edit this topic and set it as a question so it can be marked solved once complete.
I would use the get_posts function which accepts the WP_Query args to find the posts. There are args that allow you to search for custom field values. There is even documentation on the ACF site that talks you through how to query posts based on custom field values.
On that note, did you not search before posting this question?
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.