• Resolved luisfeeney

    (@luisfeeney)


    Hi

    I’m using the “metadata” shortcode,

    works well, I get the data I want: a number, for example
    58000.00000

    I want to show the number with format, for example:
    58,000.00

    I ask you this question after trying in various ways, without success.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi @luisfeeney,

    you can apply a custom filter to the retrieved value.

    Example:

    [su_meta key="mood" filter="my_mood_filter"]
    

    Add to functions.php:

    function my_mood_filter( $value ) {
    	return 'My mood is: ' . $value;
    }
    Plugin Author Vova

    (@gn_themes)

    Function name must contain the word filter.

    Thread Starter luisfeeney

    (@luisfeeney)

    Work!

    function gracias_vladimir_filter( $value ) {
    return number_format($value , 2 , “,” , “.”) . “\n”;
    }

    Muchas gracias y saludos

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Show Metadata’ is closed to new replies.