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');