• Resolved jx2900

    (@jx2900)


    Hi,
    I love TablePress. I always like to compile things into table instead of just words. I am not good at reading. But seeing table format, it is much easier to digest things quickly for me. So I am making a lot of tables. But as I make more tables, the latest table is always displayed at the end by ‘id’.
    In the view list of All tables, I would like to see by order of modified date when I go in “All tables”. I can sort tables by modified dates as order=desc by clicking “Last-modified-date” twice.

    And I modified view-list.php under /wp-content/plugins/tablepress/views/.
    ‘id’,true –> ‘id’, false
    ‘last_modified’, false –> ‘last_modified’, true

    $sortable_columns = array(
    			'table_id'  => array( 'id', false ), // true means its already sorted
    			'table_name'       => array( 'name', false ),
    			'table_description' => array( 'description', false ),
    			'table_author'      => array( 'author', false ),
    			'table_last_modified_by' => array( 'last_modified_by', false ),
    			'table_last_modified'    => array( 'last_modified', true ),
    		);

    By changing this, I can sort by clicking “Last-modified-date” only once instead of twice.

    How can I sort tables by last-modified-date every time when I go into “All tables”?

    WordPress: 5.7.4
    TablePress: 1.7
    Display Options:
    id, Table_name, Descriptions, Modified_by, Last_modified_date
    200 tables per page
    * In my page, words are being displayed in Japanese. So some words I used in English might be little different. If this confuses you, sorry.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.
    Also, sorry for the late reply. I was very busy with personal life, so that I could not reply earlier.

    I see what you mean, but unfortunately, I don’t have a direct solution here. I’ll have to check if and how these sorting parameters can be made user-configurable.

    For now, I would recommend to add a bookmark in your browser to the sorted list, which has the URL
    https://www.example.com/wp-admin/admin.php?page=tablepress&orderby=last_modified&order=desc
    (where example.com is your site).
    Then, you could click an icon in your browser’s bookmark bar to quickly get the list of tables in the desired order.

    Regards,
    Tobias

    Thread Starter jx2900

    (@jx2900)

    Thank you again, Tobias,

    I noticed “&orderby=last_modified&order=desc” when I clicked twice on “Last-Modified-Date” but couldn’t come up with the bookmark idea. I will use your recommendation.

    Best regards,
    Junji

    • This reply was modified 3 years, 2 months ago by jx2900.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    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 here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting tables list by last-modified-date’ is closed to new replies.