Home › Forums › General Issues › ACF Repeater – Checkbox Subfield with Multiple Values › Reply To: ACF Repeater – Checkbox Subfield with Multiple Values
You can adjust it to use an OR operator by something like:
<?php if( have_rows('resources') ): while( have_rows('resources') ) : the_row();
$colors = get_sub_field('show_for');
if( !empty($colors) && ( in_array('usersme', $colors) || in_array('other_value', $colors) ) { ?>
TEST
<?php } endwhile; endif; ?>
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.