Order the rows in different ways when a table is shown.
This feature module is part of the TablePress Premium plans.
For some tables, it can be useful to show the rows in random, reversed, sorted, or manually chosen order each time.
Feature description
Here are examples:
Normal order
This is an example table:
Last Name | First Name | Birthday | Company | Phone (Ext.) | ZIP code | Country | Balance | Points | Rating |
---|---|---|---|---|---|---|---|---|---|
Banks | Travis | 05/04/1969 | Apple | 200-4324 | 64655 | Italy | $61.17 | 8 | 6.6 |
Cain | Lawrence | 05/16/1994 | IBM | 701-3108 | 98004 | United States | $54.81 | 5 | 2.5 |
Middleton | Dennis | 01/10/1992 | 580-9501 | 80913 | Spain | $24.83 | 4 | 5.2 | |
Valenzuela | Lunea | 01/09/1966 | Cisco | 970-8655 | 51606 | Germany | $74.07 | 7 | 3.7 |
Burgess | Quynn | 09/24/1988 | Mozilla | 430-8943 | 78965 | France | $16.13 | 8 | 2.9 |
Reversed order
This is the same table but in automatically reversed order:
Last Name | First Name | Birthday | Company | Phone (Ext.) | ZIP code | Country | Balance | Points | Rating |
---|---|---|---|---|---|---|---|---|---|
Burgess | Quynn | 09/24/1988 | Mozilla | 430-8943 | 78965 | France | $16.13 | 8 | 2.9 |
Valenzuela | Lunea | 01/09/1966 | Cisco | 970-8655 | 51606 | Germany | $74.07 | 7 | 3.7 |
Middleton | Dennis | 01/10/1992 | 580-9501 | 80913 | Spain | $24.83 | 4 | 5.2 | |
Cain | Lawrence | 05/16/1994 | IBM | 701-3108 | 98004 | United States | $54.81 | 5 | 2.5 |
Banks | Travis | 05/04/1969 | Apple | 200-4324 | 64655 | Italy | $61.17 | 8 | 6.6 |
Configuration
Reversed order
To show a table in reversed order, use the Shortcode
[table id=123 row_order=reverse /]
Code language: JSON / JSON with Comments (json)
and change the 123
to the desired table ID.
Random order
To show the rows of a table in random order, use the Shortcode
[table id=123 row_order=random /]
Code language: JSON / JSON with Comments (json)
Sorted order
To show the table pre-sorted by a desired column, use the Shortcode
[table id=123 row_order=sort row_order_sort_column=A row_order_sort_direction=DESC /]
Code language: JSON / JSON with Comments (json)
Using the parameters row_order_sort_column
and row_order_sort_direction
, you can define the column that shall be sorted and the sorting direction (ASC
for ascending or DESC
for descending order).
Manual row order
To show specific rows of a table in a desired order, you can use the Shortcode
[table id=123 row_order=manual row_order_manual_order="5,2,8-12" /]
Code language: JSON / JSON with Comments (json)
The parameter row_order_manual_order
can be used to define the rows that shall be shown and their order, as a comma-separated list and as ranges of rows. In addition, the values all
for all table rows in their original order, and reverse
for all table rows in reversed order are possible.
Usage instructions
To use this feature with your tables, choose the desired options on the table’s “Edit” screen.
On this page