Please wait...

Pre-filtering tables through URL

Video versionA video overview of search/filter tables via URL in wpDataTables

Search/filter tables via URLHow to set filter values through page URL address

If you want to open the tables pre-filtered by some specific value – for example, you would like to create one table, but open it by several links, pre-filtered by a specific value, it is possible to do this using a special URL key.

E.g. this table will be pre-filtered with ‘and‘ if you reopen this same page using this link.

To pre-filter the table just open the page adding a key to the url:

?wdt_search=filtervalue

Where ‘filtervalue’ is the value that you would like to insert to the filtering field. This would pre-filter the table via global search. To see a quick video overview of this feature click here.

Defining column filter values in the URLSet individual columns advanced filter values through page URL address

You can also predefine column filter values for the table in the URL, which may come in handy when you would like to e.g. send your client a deeplink with some info from your catalog already filtered for him. The URL key that will be parsed by the wpDataTables is “wdtColumnFilter[KEY]” where the KEY is either a zero-based numerical index of the column you would like to filter, or an initial header of the column (header or the CSV or Excel table, or MySQL column header for MySQL-based column header). E.g.

http://www.wpdatatables.com/documentation/table-features/global-search-via-url/?wdt_column_filter[1]=Linz

(see the URL part after “?” and check the table output)

The values parsed from this URL will be used as default filter values.

Never miss new features!

Join 2000+ newsletter subscribers

Never miss notifications about new cool features, promotions, giveaways or freebies - subscribe to our newsletter! We send about one mail per month, and do our best to keep our announcements interesting.

We never spam or disclose your address to anyone.