WPIntell

Source evidence

Making Some Columns Not Sortable

WP DataTable · support · 2018-04-12T22:34:00+00:00

mixedsentiment
mediumseverity
0.84relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 35 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
luxinterior resolved
I’m trying to make some columns not sortable and found this… https://datatables.net/forums/discussion/21164/disable-sorting-of-one-column …but I’m not sure how to implement it in the shortcode. I have two columns with the class ‘no-sort’, but am not sure what the next step is. Can you please give an example? Thanks – Lux Something like this should work: [wp-datatable id="table1"] "columns": [ {"name": "first", "orderable": "false"}, {"name": "second", "orderable": "true"}, {"name": "third", "orderable": "true"}, {"name": "fourth", "orderable": "true"} ], "order": [[1, 'asc']] [/wp-datatable] Thanks for the response. I wasn’t sure how to add the commands initially but seeing your example cleared it up. I went back to datatables.net and found another solution that works better for my needs. [wp-datatable id="themes"] "columnDefs": [ { "targets": 'no-sort', "orderable": false } ] [/wp-datatable] All I need to do now is figure out how to override the css and add my own, and I’m golden. Any tips/hints? Thanks Lux Sam Just an FYI. I installed the plugin on my VPS just fine but when I tried to install it on a third party hosting company I got a ‘The plugin does not have a valid header.’ message when I tried to activate it. I did a bit of digging around and found that it was the < and > in the copyright message in plugins/wp-datatable/trunk/wp-datatable.php that was causing the issue. I just removed those two symbols and was able to install just fine. Hope that helps. Lux Yes, datatables is very flexible there multiple ways how to achieve one think… Thanks for info, I’ve fixed it and released new version.

Comments

4 shown
samsk 2018-04-13T12:48:00+00:00

Something like this should work: [wp-datatable id="table1"] "columns": [ {"name": "first", "orderable": "false"}, {"name": "second", "orderable": "true"}, {"name": "third", "orderable": "true"}, {"name": "fourth", "orderable": "true"} ], "order": [[1, 'asc']] [/wp-datatable]

luxinterior 2018-04-13T16:04:00+00:00

Thanks for the response. I wasn’t sure how to add the commands initially but seeing your example cleared it up. I went back to datatables.net and found another solution that works better for my needs. [wp-datatable id="themes"] "columnDefs": [ { "targets": 'no-sort', "orderable": false } ] [/wp-datatable] All I need to do now is figure out how to override the css and add my own, and I’m golden. Any tips/hints? Thanks Lux

luxinterior 2018-04-13T16:29:00+00:00

Sam Just an FYI. I installed the plugin on my VPS just fine but when I tried to install it on a third party hosting company I got a ‘The plugin does not have a valid header.’ message when I tried to activate it. I did a bit of digging around and found that it was the < and > in the copyright message in plugins/wp-datatable/trunk/wp-datatable.php that was causing the issue. I just removed those two symbols and was able to install just fine. Hope that helps. Lux

samsk 2018-04-13T20:16:00+00:00

Yes, datatables is very flexible there multiple ways how to achieve one think… Thanks for info, I’ve fixed it and released new version.