Code Examples

Display a field <p><?php the_field(‘field_name’); ?></p> Retrieving a field as a variable <?php $variable = get_field(‘field_name’); // do something with $variable ?> Using conditional statements get_field returns false if (value == “” || value == null || value == false) <?php if(get_field(‘field_name’)) { echo ‘<p>’ . get_field(‘field_name’) . ‘</p>’; } ?> Working with Array values … Continue reading Code Examples