Home › Forums › Pro Support › Help me achieve something similar › Reply To: Help me achieve something similar
October 20, 2016 at 1:49 pm
#908
Keymaster
Exactly like that – you’d just add more variables:
add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
function wpsp_add_custom_meta()
{
$first_meta = get_post_meta( get_the_ID(), '_your_custom_meta_key', true );
$second_meta = get_post_meta( get_the_ID(), '_your_second_custom_meta_key', true );
$third_meta = get_post_meta( get_the_ID(), '_your_second_custom_meta_key', true );
if ( isset( $first_meta ) && '' !== $first_meta )
echo $first_meta;
if ( isset( $second_meta ) && '' !== $second_meta )
echo $second_meta;
if ( isset( $third_meta ) && '' !== $third_meta )
echo $third_meta;
}