Hey there, Awesome Customers!
Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.
During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.
We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.
Thanks a bunch for your understanding and support!
Catch you on the flip side!
Warm regards,
TMS
Hi,
I have enabled the "Calculate average" setting for my columns. And I'm using the shortcode to display the average value in my page. How can I round this value to a whole number? I don't want to show the 2 decimal places.
Thanks
Ian
Hello Ian
At the moment it cannot be done, but I have forwarded your question to one of our developers, and as soon as he responds I'll let you know.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi again Ian
You can use the filter wpdatatables_filter_float_cell
It will, however, be used on the whole table, not only on that shortcode.
Also, you can change it directly in the template file: wp-content/plugins/wpdatatables/templates/frontend/aggregate_functions.inc.php on line 7 you will find this:
So, just replace it with this:
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks
So if I use the filter, it will round all the numbers in the table to a whole number? If so, that’s fine.
How do I use the filter? Do I need to write a function in the functions.php file?
Can you help me get started?
Thanks
Hi again Ian
That's right, it will not show the decimals.
If you go for the filter option, you will need to create a function in your functions.php file, yes. Unfortunately, I can't help you with that, as it is custom code, and is not included in the provided support for the plugin.
I can show some examples of usage of other filters:
Or:
I hope that helps.
There's always the other way, changing the line of code in wp-content/plugins/wpdatatables/templates/frontend/aggregate_functions.inc.php on line 7
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi,
I tried changing the line 7 in the aggregate_functions.inc.php file but it didn't change the "Average" number format. It still has 2 decimal places.
Alright, Ian
I forwarded the ticket to one of our developers, and I'll get back to you as soon as he responds.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi again Ian
For the table, you should change this for serverside tables:
In file wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js on line 615 you'll find this:
Replace it with this:
For non-server-side tables, in the same file:
wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js on line 683 you'll see this:
And replace it with this:
After that, go to wpDataTables settings/Custom JS and CSS and disable "Use minified wpDataTables Javascript", and it should work.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks, I’ll try that.
Will I lose this customisation every time the plugin is updated?
Is there anyway to maintain the change after updating the plugin?
Hi,
Those changes didn't work either.
But I discovered I can achieve this by setting the "Decimal Places" to "0" in the settings here: wpDataTables > Settings > Main Settings > Decimal Places.
Thanks
Hi again Ian
I'm glad to hear this option works for you.
It's even better maybe, because the changes I advised would revert after updates, so you would need to do it again.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables