Title: Sorting Order Plugin Question
Last modified: March 21, 2022

---

# Sorting Order Plugin Question

 *  Resolved [nittygrittytechy](https://wordpress.org/support/users/nittygrittytechy/)
 * (@nittygrittytechy)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/)
 * Hello,
 * Before I purchase this plugin, I am having a problem and need help please.
    [https://tablepress.org/extensions/table-row-order/](https://tablepress.org/extensions/table-row-order/)
 * I uploaded this plugin added the short code.
 * [table id=4 **row_order=reverse** responsive=collapse responsive_breakpoint=”
   phone” /]
 * However, it is not in order by date. I’m not sure what column it is using to 
   be in reverse order.
 * I would like the date column to be in order, so that would be in ascending order
   since I am using google sheets to upload the data. In google sheets, the new 
   content is added at the bottom, which is not 1.
 * Would this plugin work for me or do I need to add a command code?
 * Thank you

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15478014)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * This Shortcode parameter from the Row Order Extension shows the table in reversed
   order from that on the “Edit” screen. It does not do any sorting. (Sorting is
   possible with other parameters, but not directly for dates, due to the various
   possible formats.)
    I would therefore indeed recommend a JS-based sorting, via
   a “Custom Command”. To find that, can you please post a link to the page with
   the table where this problem happens, so that I can take a direct look? Thanks!
 * Regards,
    Tobias
 *  Thread Starter [nittygrittytechy](https://wordpress.org/support/users/nittygrittytechy/)
 * (@nittygrittytechy)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15485253)
 * Sorry for the late reply.
 * Okay great, here is my link.
    [https://livinghisword.org/daily-biblical-news/](https://livinghisword.org/daily-biblical-news/)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15487519)
 * Hi,
 * thanks for the link!
 * To automatically sort by these dates, please add this to the “Custom Commands”
   text field:
 *     ```
       "order": [ [ 5, "desc" ] ]
       ```
   
 * This will sort by the sixth column (counting the columns starts with 0), in descending
   order. To get ascending order, use `"asc"` in the code.
 * Regards,
    Tobias
 *  Thread Starter [nittygrittytechy](https://wordpress.org/support/users/nittygrittytechy/)
 * (@nittygrittytechy)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15488580)
 * Thank you for this code, however it is still not sorting correctly. The next 
   date, after 3-23-22, should be 11-5-2021 and then 11-3-2021 and so forth.
 * Am I doing something wrong?
 * Thank you
 * [https://livinghisword.org/daily-biblical-news/](https://livinghisword.org/daily-biblical-news/)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15489140)
 * Hi,
 * ok, it looks like the format auto detection is not working properly. We might
   just have to manually set the data type to “date” for that column. To achieve
   that, please change the full “Custom Command” to
 *     ```
       "columnDefs": [ { "className": "none", "targets": [ 1, 2, 3, 4 ] }, { "type": "date", "targets": [ 5 ] } ], "order": [ [ 5, "asc" ] ]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [nittygrittytechy](https://wordpress.org/support/users/nittygrittytechy/)
 * (@nittygrittytechy)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15489627)
 * Whoohoo, it finally works. Thank you sooooooooo much!!!!!!!!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15490274)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias

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

The topic ‘Sorting Order Plugin Question’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/sorting-order-plugin-question/#post-15490274)
 * Status: resolved