sorry for so many questions, though its really important to me, and so far for my current problem, i wasn't even able to find a proper workaround. My question is: Is it possible to force sorting on a specific column? My aim is i have a boolean column, and would like to always put 'yes' values / rows at the bottom of the table.
I even tried tablesorter.js, but found out it does not work (probably because wpdt resolves sorting after the tablesorter?).
Each column can be set to be the default sorting column for a table. You can access column settings, and go to "Sorting". There you can set the sorting to be either Ascending or Descending.
thank you for your response. This approach only allows me to set the initial sort, i.e. when the table loads. When the user then sorts on different columns, this predefined sort is ignored. What i wanted to achieve was to force the sort in all cases so that 'yes' values would always be at the bottom, but various other sorting would still be available.
I am sorry to disappoint you, but unfortunately something like this is not possible with the plugin's built in features.
You can create a table using an SQL query, where you would use the ORDER BY clause, and then the table will be sorted by this column by default. Then, you can disable sorting for the table, if that is an option of course.
Other than that, it would be considered as a custom solution, and can probably be implemented using our filters and hooks.
Hello again,
sorry for so many questions, though its really important to me, and so far for my current problem, i wasn't even able to find a proper workaround. My question is: Is it possible to force sorting on a specific column? My aim is i have a boolean column, and would like to always put 'yes' values / rows at the bottom of the table.
I even tried tablesorter.js, but found out it does not work (probably because wpdt resolves sorting after the tablesorter?).
Thank you so much for your help so far.
Hello Vaclav.
Each column can be set to be the default sorting column for a table. You can access column settings, and go to "Sorting". There you can set the sorting to be either Ascending or Descending.
I hope this helps.
Best regards.
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 Aleksandar,
thank you for your response. This approach only allows me to set the initial sort, i.e. when the table loads. When the user then sorts on different columns, this predefined sort is ignored. What i wanted to achieve was to force the sort in all cases so that 'yes' values would always be at the bottom, but various other sorting would still be available.
Thank you again.
Hi again Vaclav.
I am sorry to disappoint you, but unfortunately something like this is not possible with the plugin's built in features.
You can create a table using an SQL query, where you would use the ORDER BY clause, and then the table will be sorted by this column by default. Then, you can disable sorting for the table, if that is an option of course.
Other than that, it would be considered as a custom solution, and can probably be implemented using our filters and hooks.
Best regards
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