Sorting tables list by last-modified-date
-
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.
- The topic ‘Sorting tables list by last-modified-date’ is closed to new replies.