I’ve spent some time searching for a solution but have not found 1 single example of how to do this.
I would like to place a shortcode in the value field of the Custom Field meta box in WordPress so it executes on the front end without hardcoding the shortcode into a template file.
Here’s my standard code i’m using to hook in the output of the shortcode on the front end via my template:
$two = get_post_meta( get_the_ID(), 'field_2_solid', true );
if( ! empty( $two ) ) {
echo '<div class="wrap">'. $two .'</div>';
}
I understand i can hard code it into the file but thats not flexible and not what i want to do.
Not sure it can be done.