DataTables Counter Column

The DataTables JavaScript library has a Counter Column plugin that transforms a table’s first column into a column with a “counter” for the row number to the table. This column is not sortable, and remains in place as the sorting and filtering is applied to the table. Because of that it can be used for having a ranking column, even after sorting.

To use this, download, install, and activate the Extension like a regular WordPress plugin. Then, on the page where you want to show the table, insert the extended Shortcode

[table id=123 datatables_counter_column=true /]

and change the 123 to the desired table ID.

Additionally, you will need to add a new first column to that table (by selecting the checkbox below the current first column of the table, and clicking the “Insert” button after “Selected columns:”).

If this Extension is helpful for you, please consider supporting further TablePress development with a donation. Thank you!

Top