Forums › Forums › Search & Filter Pro › Filter Numbers with thousand separator
Tagged: thousand separator
- This topic has 38 replies, 2 voices, and was last updated 4 years, 7 months ago by Anonymous.
-
Trevor(Private) May 29, 2020 at 2:49 pm #246545
Well, I did not know you could add an ACF field like that in Elementor.
That method you could not use.
However, you could make a custom shortcode that itself contains PHP that WOULD do as you need (take a raw number and format it). You would need this plugin to make the shortcode with PHP in it.
In a Text editor, in the Text tab, you would place the shortcode that you made). This is the plugin:
Trevor(Private) May 29, 2020 at 3:17 pm #246563Let us do this in steps. Make a snippet named
show_price
and set it to PHP and Shortcode like this with this code:https://www.screencast.com/t/XE4JLnu9wCuy
Code used:
echo "this is the price";
Then, in the Text tab of a Text editor, place the shortcode:
[show_price]
And see if that works (shows that message)? If it does …
Make a test ACF field for the cars, named
test_price
, in one car add the raw price.Change the snippet to this:
$test_price = get_field('test_price'); if( $test_price ) echo $test_price;
Check to see if on that car’s page, that worked? Then, if it does, we need to format the number.
-
AuthorPosts