Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]

You can see in the docs that you get the values by get_field(), so do something like this:

$values = get_field( 'field_name' );
if ( $values ) {
    echo 'A value is set';
} else {
    echo 'A value is not set';
}

Change field_name to your wanted field.

Leave a Comment