Support » Plugins and Hacks » [Resolved] Admin sort

[Resolved] Admin sort

  • Hi Tobias,
    Just out of curiosity, as I was unable to locate any documentation on this.I have two questions. 1)Currently on back end in admin area of tablepress, the list of tables currently sort by table ID. I know I can click on Table name to sort by that, but is there a spot you can lead me to within files that I can change sorting to always sort by table name. 2) is there a spot within php files that I can change number of tables shown per page in backend?

    If I have some how missed documentation on this please lead me to it and I will gladly read.

    Thank you, as always, for your great work and continuous effort on this project. I put review and rating in this morning.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg



    thanks for your questions.

    I’ll start with the second one, as that’s pretty easy 🙂 This is core WordPress functionality, so you’ll just to click on the “Screen Options” tab in the top right corner of the screen. There, you can select, how many tables you want to see on the “All tables” screen.

    Setting a default sort order is more tricky and does indeed require a code change in TablePress. Now, just so that you know, I generally don’t recommend this, as you would lose this change after each update of TablePress and would have to re-apply it.
    The necessary change is in the file /views/view-list.php. There, change line 663 from

    wp_reset_vars( array( 'orderby', 'order', 's' ) );


    wp_reset_vars( array( 'orderby', 'order', 's' ) );
    if ( ! $orderby && ! $order ) {
      $orderby = 'name';
      $order = 'asc';


    Thanks Tobias. Works perfectly. I will save email so I have a copy of code for customization.

    Plugin Author TobiasBg



    very nice! 🙂 Great to hear that this helped!

    Best wishes,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Admin sort’ is closed to new replies.