Home › Forums › Pro Support › Custom Fields › Reply To: Custom Fields
January 29, 2020 at 5:45 pm
#13016
Keymaster
To display terms from a taxonomy, you would need to use this function: https://developer.wordpress.org/reference/functions/get_terms/
To add a class to your custom fields, you can do this:
add_action( 'wpsp_before_content', function() {
$meta = get_post_meta( get_the_ID(), 'precio', true );
if ( isset( $meta ) && '' !== $meta ) {
echo '<div class="your-class-name-here">';
echo $meta; echo "€";
echo '</div>';
}
} );