Hi wpfieldwork,
I am trying to make this as a shortcode – and it is working, but ignoring the “Do Not Show” and just showing that value anyway – any ideas?
// shortcode for page
function shortcodeinfo() {
$value = get_field( "thefield" );
if( $value && $value != "Do Not show") {
return '&value';
} else {
return '';
}
}
// Register shortcode
add_shortcode('shortcodetoadd', 'shortcodeinfo');
Figured it out 🙂
echo '<p>acf stuff' . get_field('location') . '</p>';
Now – how to hide this line, if no value, or a specific value is saved for this field?