Title: automatic sort
Last modified: August 22, 2016

---

# automatic sort

 *  Resolved [drucken25](https://wordpress.org/support/users/drucken25/)
 * (@drucken25)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/automatic-sort/)
 * The data I generate for my table is not sorted. A user can obviously sort the
   table, but is there a way to specify automatic sorting to take place whenever
   the table data is updated (in my case this is done via auto-import), e.g. “sort
   by column x, descending”?
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/automatic-sort/#post-5719337)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * You have two options here. One (probably the better one), is to use the Table
   Row Order Extension from [http://tablepress.org/extensions/table-row-order/](http://tablepress.org/extensions/table-row-order/)
   which sorts before sending the data to the user.
 * The other would be to initiate a sort on the desired column once the table was
   loaded by the user’s browser. For that, you’d have to add a “Custom Command” 
   like
 *     ```
       "order": [ 2, 'desc' ]
       ```
   
 * into the corresponding text field on the table’s “Edit” screen.
    The `2` in the
   example would initiate the sort on the third column, as counting the columns 
   starts with 0 in the code. Thus, just adjust that number as desired.
 * Regards,
    Tobias
 *  Thread Starter [drucken25](https://wordpress.org/support/users/drucken25/)
 * (@drucken25)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/automatic-sort/#post-5719465)
 * Thanks Tobias,
    quick and efficient answer. I did go with your extension, works
   well. Btw, I could not find it when I clicked add new plugin in the WP dashboard.
   Best, Gerhard
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/automatic-sort/#post-5719495)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * That Extension (and all the others) are not part of the WordPress plugin directory,
   which is why you can’t find them via that search.
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘automatic sort’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

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

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