Home › Forums › Pro Support › Output Custom Field in Div Class › Reply To: Output Custom Field in Div Class
July 16, 2018 at 9:20 pm
#5267
Keymaster
For sure:
add_action( 'wpsp_after_content', 'tu_add_custom_meta' );
function tu_add_custom_meta() {
$meta = get_post_meta( get_the_ID(), '_custom_meta_key_name_here', true );
if ( isset( $meta ) && '' !== $meta ) {
echo '<div class="my-class-here">' . $meta . '</div>';
}
}