Title: [Plugin: WP-Table Reloaded] Custom Sorting Command
Last modified: August 20, 2016

---

# [Plugin: WP-Table Reloaded] Custom Sorting Command

 *  Resolved [reedbird8](https://wordpress.org/support/users/reedbird8/)
 * (@reedbird8)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-custom-sorting-command/)
 * I’d like to enable my tables to be returned to the original heirarchichal order
   from the table, which is different than any one of the columns being sorted alphabetically.
 * Any way to make this happen?
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-custom-sorting-command/#post-2986071)
 * Hi,
 * there might have been some miscommunication in my tweet leading to this post:
   For this, a “Custom Command” is not enough unfortunately. Instead, you will need
   to call a custom DataTables API function via some JavaScript code, which you 
   can find at [http://datatables.net/plug-ins/api#fnSortNeutral](http://datatables.net/plug-ins/api#fnSortNeutral)
   You could for example add a button to your page and execute that code when the
   button is clicked.
 * The “Custom Command” that I mentioned was targeted at being able to exclude columns
   from being sortable. That is possible by adding
 *     ```
       "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0, 2, 3 ] } ]
       ```
   
 * to the “Custom Commands” textfield in the “DataTables JavaScript features” section
   on the “Plugin Options” screen of WP-Table Reloaded.
    This example would make
   columns 1, 3, and 4 non-sortable (counting starts with 0).
 * Regards,
    Tobias
 *  Thread Starter [reedbird8](https://wordpress.org/support/users/reedbird8/)
 * (@reedbird8)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-custom-sorting-command/#post-2986081)
 * Thanks, Tobias. Appreciate all your assistance!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-custom-sorting-command/#post-2986094)
 * Hi,
 * sure, no problem! You are very welcome!
 * Best wishes,
    Tobias

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

The topic ‘[Plugin: WP-Table Reloaded] Custom Sorting Command’ 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/)

## Tags

 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-custom-sorting-command/#post-2986094)
 * Status: resolved