We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Custom Fields Reply To: Custom Fields

#13016
Tom
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>';
    }
} );