Title: default sort
Last modified: August 21, 2016

---

# default sort

 *  Resolved [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/)
 * ive got a table with 6 columns.
 * im trying to prevent column 0 from being sortable and sort column 1 in ascending
   fashion by default.
 * ive tried many custom commands strings without luck. here’s my latest:
    `"aoColumnDefs":[{"
   bSortable": false, "aTargets": [ 0 ] }, { "aaSorting": [1, 'asc' ] } ]`
 * but the results are no good on either front. 🙁
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664749)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Please post a link to the page with the table, so that I can directly investigate
   this. Thanks!
 * Also, note that WP-Table Reloaded has been replaced by TablePress, see [http://tobias.baethge.com/2013/01/tablepress-replaces-wp-table-reloaded/](http://tobias.baethge.com/2013/01/tablepress-replaces-wp-table-reloaded/)
   You should consider switching!
 * Regards,
    Tobias
 *  Thread Starter [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664754)
 * [http://www.invictusfighting.com/index.php/champions/](http://www.invictusfighting.com/index.php/champions/)
 * gotta stick with wp 3.4.2 (which precludes me from tablepress) until they address
   the fatal no plugins issue with wp 3.5+ for us evil, evil windows hosts.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664770)
 * Hi,
 * thanks for the link!
 * It looks like, you’ll just have to move the `aaSorting` command out of the `aoColumns`
   array:
 *     ```
       "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], { "aaSorting": [1, 'asc' ] }
       ```
   
 * Can you please try that?
 * And are you sure that such a severe issue has not yet been fixed in WP 3.5.1?
   I can’t really believe that such a problem would not warrant immediate action(
   i.e. another 3.5.x release). Or is this more of a configuration issue of your
   server?
 * Regards,
    Tobias
 *  Thread Starter [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664773)
 * sorry, no change.
 * and yes, the issue is still present in 3.5.1. if it were a problem with linux
   hosts too, im sure it would have been fixed already. but us windows hosts are
   second-class citizens dont u know. 😉
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664778)
 * Hi,
 * Argh, we had too many braces… Another try:
 *     ```
       "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], "aaSorting": [1, 'asc' ]
       ```
   
 * Yes, Linux probably gets more attention, as it’s used more frequently. Did you
   look if there’s a ticket for your issue in [Trac](http://core.trac.wordpress.org/timeline)?
   Maybe they need more information by someone on a Windows host…
 * Regards,
    Tobias
 *  Thread Starter [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664786)
 * no change still.
 * while linux dominates the web server os market, windows isnt eaxctly boutique
   at nearly 20%. ive found that raising issues involving windows to any higher 
   powers around here does no good. in fact, it only seems to attract persecution.
   so i dont make waves, lest i suffer the consequences. hopefully i havent said
   too much already.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664788)
 * Hi,
 * very weird. I now get a different script error, but I can’t make sense of it…
   
   I guess we should start over from the beginning: 1. Does everything work if you
   remove the “Custom Commands” entirely? 2. Does it work with just
 *     ```
       "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ]
       ```
   
 * ?
    3. Does it work with just
 *     ```
       "aaSorting": [1, 'asc']
       ```
   
 * ?
 * Yes, and as Windows is actually used a bit, I’m surprised to hear that such an
   issue is not yet fixed. There’s at least one core developer who does a lot on
   Windows.
    And don’t worry, the devs will not persecute you based on your OS choice!
   🙂 So, you might really want to look for a ticket and add your debug details 
   to help. Or you might actually have to create a new ticket, in case the issue
   hasn’t even been reported yet.
 * Regards,
    Tobias
 *  Thread Starter [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664802)
 * 1 – yes
    2 – yes 3 – no (no default sort and sort selectors disappear)
 * while the devs might not persecute someone for such petty reasons, there are 
   those in power here that would. heh, ask me how i know. 😉
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664808)
 * Hi,
 * ok, thanks for testing this! Then there’s something wrong with the `aaSorting`
   command. We might have to add another pair of `[]` brackets:
 *     ```
       "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], "aaSorting": [[1, 'asc' ]]
       ```
   
 * Sorry to hear that this Windows bashing happened to you. I hope that this can
   be fixed soon, so that you can update WordPress and then also switch to TablePress.
 * Regards,
    Tobias
 *  Thread Starter [RandomName](https://wordpress.org/support/users/randomname/)
 * (@randomname)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664814)
 * that did it, thx much!
 * dont worry about the windows bashing, its not ur fault. ive never seen u be anything
   but professional.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664817)
 * Hi,
 * very nice! Great to hear that this helped! 🙂
 * And thanks for the nice words, I really appreciate it!
 * Best wishes,
    Tobias

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

The topic ‘default sort’ 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/)

 * 11 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/default-sort-1/#post-3664817)
 * Status: resolved