<?php //Vars
$check_the_box = get_sub_field('needs_to_link_to_another_page'); ?>
<?php if ( $check_the_box && in_array('yes', $check_the_box) ) : ?>
<!-- Function gets field conten if it is 'yes' and returns it to the variable. And then,
since it meets the criteria of being 'yes', it continues on and performs the rest of the code.
It basically reads, "If the field content matches 'yes', then . . . " -->
<a href="<?php the_sub_field('concentration_link'); ?>" style="color:#ffffff;">Find out more!</a>
<?php endif; ?>
<!-- In this case, the custom fields for this section are all sub-fields in a repeater section.
There are fields for title, text, and then 'needs_to_link_to_another_page' is a yes/no checkbox
sub-field, followed by 'concentration_link', which is an acf "page link". It looks up pages on
the site and returns the link that you choose. The checkbox sub-field should have
the conditional logic option chosen, as 'needs_to_link_to_another_page' is equal to
yes.-->