DataTables ColumnFilterWidgets

This TablePress Extension has been retired. It is no longer available.

As an alternative, you can use the Column Filter Dropdowns module that is available in TablePress Premium plans.

The DataTables JavaScript library has a ColumnFilterWidgets plugin that allows to add filtering dropdown boxes above the table. Each column will get a select box with all possible values from that column.

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 “” not found /]

and change the 123 to the desired table ID. This will add dropdown boxes for every columns.

If you don’t want a dropdown box for every column, you can add another parameter to the Shortcode, with a comma separated list of columns, like

[table “” not found /]

This would add a dropdown box for all columns, except columns 2, 3, and 4.

Note that the column numbers here are meant without those columns that are hidden on the “Edit” screen of the table, i.e. only columns that are visible in the table should be counted when determining these column numbers.

To set a limit on the number of allowed selections per dropdown box, add this parameter:

[table “” not found /]

With that, only one value can be selected from each dropdown box at a time. The visitor would have to remove it by clicking on it, before he can select another filter value.

If your filter columns contain a list of possible keywords, e.g. a list of colors (“red, blue, green, yellow”) where filtering should only be done for one color, you can define the separator characters for these keywords, so that the list is split automatically:

[table “” not found /]