Hi,
I’m trying to create a conditional selection field. I would say the problem is that it is within a group, when the pull of the group works properly
This works:
<?php
$group = get_field('group');
$field = $group['field'];
if( $field ) { ?>
<p>My text</p>
<?php } ?>
But when I put a conditional, it doesn’t work :
<?php
$group = get_field('group');
$field = $group['field'];
if( $field == 'field1' ) { ?>
<p>My text</p>
<?php } ?>
Any solution?
Thanks!
Need more information. What is the name of the field and the sub fields? What type of fields? What can the values be?