Title: TablePress default sorting
Last modified: November 16, 2023

---

# TablePress default sorting

 *  Resolved [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * (@wilbertschaapmancom)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/)
 * I simply like to order the table by column 1 by default. This column is a pods
   field number . Is there a simple way to do this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftablepress-default-sorting-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/#post-17206594)
 * Hi!
 * Thanks for your post and sorry for the trouble!
 * For that, you could maybe try adding this to the “Custom Commands” text field
   on the table’s “Edit” screen:
 *     ```wp-block-code
       "order": [ [ 0, "asc" ] ]
       ```
   
 * This will sort the table upon rendering of the table to the visitor, based on
   the data that is shown to the visitor (so that it wouldn’t matter where that 
   data comes from).
 * Regards,
   Tobias
 *  Thread Starter [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * (@wilbertschaapmancom)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/#post-17206746)
 * The strange thing is that these custom commands are only available when I have
   checked the box table header row, which I actually don’t want because I don’t
   want headers and search options. But anyway, when I fill this in, nothing happens
   in the default sorting? See images.
 * [https://ibb.co/9vGMXKc](https://ibb.co/9vGMXKc)
   [https://ibb.co/j4s3235](https://ibb.co/j4s3235)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/#post-17206976)
 * Hi,
 * that’s correct. This sorting feature requires a table header row (which can be
   empty and we could hide it from the visitor with CSS code) and the frontend features
   to be active. The filtering can also be turned off.
 * Your screenshots don’t show what happens to the default sorting, but it would
   be great if you could post a link to the page with the table here anyways. This
   allows me to investigate this more easily.
 * Note that the [Row Order feature module](https://tablepress.org/modules/row-order/)
   that is part of the [TablePress premium versions](https://tablepress.org/pricing/)
   could also be an option here, depending on the data. This does the sorting on
   the server, so that no “Custom Command” would be involved and you would not need
   to hide any undesired header row or filters.
 * Regards,
   Tobias
 *  Thread Starter [wilbert schaapman](https://wordpress.org/support/users/wilbertschaapmancom/)
 * (@wilbertschaapmancom)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/#post-17207128)
 * It is on my local machine. But it is working if you put on sorting for visitors:.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/tablepress-default-sorting-3/#post-17207196)
 * Hi,
 * yes, sorting must be enabled. But you can hide the header row now. For that, 
   add this to the “Custom CSS” text area on the “Plugin Options” screen of TablePress:
 *     ```wp-block-code
       .tablepress-id-123 thead {
         display: none;
       }
       ```
   
 * where 123 is the table ID.
 * Regards,
   Tobias

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

The topic ‘TablePress 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/)

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