Hello, It is not possible with a built-in option, but our developers have a custom workaround code edit which you can use, in order to change how the default 'initial sort order' is triggered when clicking in the Headers.
Please find this JS file in our Plugin's files - via your FTP ( or Hosting File Manager) in this path :
Find this piece of code, it should be around line 2255 ( best is to use CTRL+F to search for it rather than looking at exact lines, since our devs change code during some Updates):
Save changes, and now this is going to make all Headers in all your Tables have a default sorting order of Descending - when any Header is clicked on.
Then the User needs to click again to switch it as "Ascending" order.
Let us know if that works, now all your tables ( server side and non server side) should be sorting as 'descending' by default when the Header is clicked on the first time.
If you need us to edit this code for you, please provide me a temporary WP-admin (administrator) user for your site where this happens, and FTP credentials.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
Hi there,
When clicking a column sorting, is it possible for it to default to descending rather than ascending?
Thanks,
Khanh
Hello,
It is not possible with a built-in option, but our developers have a custom workaround code edit which you can use, in order to change how the default 'initial sort order' is triggered when clicking in the Headers.
Please find this JS file in our Plugin's files - via your FTP ( or Hosting File Manager) in this path :
..\wp-content\plugins\wpdatatables\assets\js\wpdatatables\wpdatatables.js.
Find this piece of code, it should be around line 2255 ( best is to use CTRL+F to search for it rather than looking at exact lines, since our devs change code during some Updates):
Add this under it :
( That is the full edited code which works on Manual Tables, too)
So in the end, that entire piece of code should look like this :
Save changes, and now this is going to make all Headers in all your Tables have a default sorting order of Descending - when any Header is clicked on.
Then the User needs to click again to switch it as "Ascending" order.
Let us know if that works, now all your tables ( server side and non server side) should be sorting as 'descending' by default when the Header is clicked on the first time.
If you need us to edit this code for you, please provide me a temporary WP-admin (administrator) user for your site where this happens, and FTP credentials.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Thank you Miloš.