Title: Default sorting
Last modified: May 14, 2019

---

# Default sorting

 *  Resolved [sorgiulio](https://wordpress.org/support/users/sorgiulio/)
 * (@sorgiulio)
 * [7 years ago](https://wordpress.org/support/topic/default-sorting-6/)
 * Hi, i have a table with 8 columns.
    In the eighth column there is the sum of 
   the other columns (=sum(A1:G1:ecc…) I want to set the eighth column in descending
   order (from highest to lowest). From the various threads I read that I have to
   use this command in the “Custom commands” filed: **“order”: [[7, ‘desc’]]** Unfortunately
   this does not work. Where am I doing wrong?
 * View Image: [https://prnt.sc/nog1ba](https://prnt.sc/nog1ba)
 * Thanks a lot.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdefault-sorting-6%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years ago](https://wordpress.org/support/topic/default-sorting-6/#post-11530571)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * The numbers in this code have to refer to the actual visible columns, so in your
   case, you probably want to use 2 or 3 instead of 7.
 * Regards,
    Tobias
 *  Thread Starter [sorgiulio](https://wordpress.org/support/users/sorgiulio/)
 * (@sorgiulio)
 * [7 years ago](https://wordpress.org/support/topic/default-sorting-6/#post-11530652)
 * What a silly mistake !!
    It’s the Preview that doesn’t work also putting “3”.
   Maybe it’s a bug. If I save the changes, the table is sorted correctly.
 * View image:
    [https://prnt.sc/nohr00](https://prnt.sc/nohr00)
 * Very thanks TobiasBg!!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years ago](https://wordpress.org/support/topic/default-sorting-6/#post-11531390)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

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

The topic ‘Default sorting’ 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

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

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/default-sorting-6/#post-11531390)
 * Status: resolved