Hi,
This works as long one or both Checkboxes are checked:
But if "NONE" are checked I get this error:
Warning: in_array() expects parameter 2 to be array, string given in
How do I write this up properly?
Thanks
This works as long one or both Checkboxes are checked:
Code:
<?php if( in_array( 'Red', get_field('materiale') ) ) {echo '<a href="' . get_field('download') . '" target="_blank" class="readmore">Red →</a>';}?> <?php if( in_array( 'Blue', get_field('materiale') ) ) {echo '<a href="' . get_field('link') . '" target="_blank" class="readmore" >Blue →</a>';}?>
Warning: in_array() expects parameter 2 to be array, string given in
How do I write this up properly?
Thanks
Comment