Problem:
The issue here here is that the user wanted to format the output from their number field with a comma for every thousand.
Solution:
This is not something that can be done natively with our Toolset plugins and as such you will need to use a little bit of custom code to format the numbers.
I've written a simple custom shortcode below to format the numbers for you.
// Add Shortcode function wp_format_number( $atts ) { // Attributes $atts = shortcode_atts( array( 'number' => '', ), $atts ); return number_format($atts['number'],0,'.',','); } add_shortcode( 'wp_format_number', 'wp_format_number' );
Add it to your Toolset Custom Code section in Toolset->Settings->Custom Code and activate it.
Then you can simply use the shortcode like this [wp_format_number number='[wpv-items-count]']
Relevant Documentation:
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 3 months ago.
Assisted by: Shane.