Home › Forums › General Issues › How to select specific posts of a custom post type in a loop with ACF? › Reply To: How to select specific posts of a custom post type in a loop with ACF?
I kinda figured this out. I added a new True/False custom field to my ‘speakers’ custom post type. Now if the box is checked, then that speaker shows up (in a separate page template for Workshop speakers). I added this to my loop:
'meta_query' => array(
array (
'key' => 'is_workshop_speaker',
'value' => '1',
'compare' => '=='
)
)
Now, only the True/False (checked) speakers are showing on my ‘Workshop Speakers‘ page which is perfect but those that are checked are still showing on my ‘Conference Speakers‘ page as well. Now my question is, how to exclude those that are checked as Workshop Speaker from my Conference Speakers page?
Thanks
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.