Title: [Plugin: WP-Table Reloaded] Sort one column
Last modified: August 19, 2016

---

# [Plugin: WP-Table Reloaded] Sort one column

 *  [MaceEcam](https://wordpress.org/support/users/maceecam/)
 * (@maceecam)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-sort-one-column/)
 * Had another thread on this topic here: [http://wordpress.org/support/topic/plugin-wp-table-reloaded-disabling-sort-for-only-one-column?replies=9](http://wordpress.org/support/topic/plugin-wp-table-reloaded-disabling-sort-for-only-one-column?replies=9)
 * Though the problem was solved, but something else came up. Instead of the two
   rows with the first one being sorted using this custom command
 * `"aoColumnDefs": [ { "bSortable": true, "aTargets": [ 0 ] }, { "bSortable": false,"
   aTargets": [ "_all" ] }, { "bSearchable": true, "aTargets": [ 0 ] }, { "bSearchable":
   false, "aTargets": [ "_all" ] } ]`
 * I need three columns with only the middle column sortable.
 * PS: I don’t think its possible, but I thought I’d ask anyway. Is it possible 
   to let the user choose which column is being sorted?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-sort-one-column/#post-1915348)
 * Hi,
 * to make only the middle column of three columns sortable and searchabled, please
   try this code:
 *     ```
       "aoColumnDefs": [ { "bSortable": true, "aTargets": [ 1 ] }, { "bSortable": false, "aTargets": [ "_all" ] }, { "bSearchable": true, "aTargets": [ 1 ] }, { "bSearchable": false, "aTargets": [ "_all" ] } ]
       ```
   
 * (only the 0 needs to be changed into a 1).
 * I’m not sure what you mean with “let the user choose”, because the user can just
   click the column he wants to have it sorted…? So, no, that is not possible with
   other means. If with “user” you mean the person creating/editing the table, then
   that it is only possible by changing that code from above.
 * Best wishes,
    Tobias
 *  Thread Starter [MaceEcam](https://wordpress.org/support/users/maceecam/)
 * (@maceecam)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-sort-one-column/#post-1915353)
 * ( : I get it. The “aTargets” refers to which column is being references. Thank
   you.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-sort-one-column/#post-1915370)
 * Hi,
 * exactly 🙂 There’s one “aTargets” that enables a feature for a certain column,
   and one that (first) disables the feature for all (keyword “_all”) columns. And
   that for the two features sorting and Filtering/Searching.
 * Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: WP-Table Reloaded] Sort one column’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-table-reloaded_f7dcd3.svg)
 * [WP-Table Reloaded](https://wordpress.org/plugins/wp-table-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-table-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-table-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-table-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-table-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-table-reloaded/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-sort-one-column/#post-1915370)
 * Status: not resolved