acf get options fields code example
Example 1: get option field acf
<?php
$variable = get_field('field_name', 'option');
// do something with $variable
?>
Example 2: acf get field
$value = get_field( "text_field" );
if( $value ) {
echo $value;
} else {
echo 'empty';
}