Table of Contents
To add a filter on a specific table column you can add an URL argument to your request that follows the following name convention:
wpda_search_column_<column_name>
Only GET requests are supported for data tables!
Examples #
Request: YOUR-URL/?wpda_search_column_first_name=Sacha
Adds condition: first_name = ‘Sacha’
Add a custom HTML input field to query field first_name
<input name="wpda_search_column_first_name" type="text" value="Sacha" />
Wilcards in URL parameters #
YOUR-URL/?wpda_search_column_title=Last%
IN conditions #
Use arrays to filter a column on multiple values (allows wildcard usage as well). For example:
YOUR-URL/?wpda_search_column_first_name[0]=Sacha&wpda_search_column_first_name[1]=Peter
YOUR-URL/?wpda_search_column_first_name[0]=Sacha&wpda_search_column_first_name[1]=Peter
Adds condition : first_name = ‘Sacha’ OR first_name = ‘Peter’
OR conditions #
Use parameter wpda_search_column_operator to compare using OR instead of AND. The plugin uses AND by default.
Example AND (default) #
YOUR-URL/?wpda_search_column_first_name=Sacha&wpda_search_column_last_name=Schulz
Adds condition: first_name = ‘Sacha’ AND last_name = ‘Peter’
Example OR #
YOUR-URL/?wpda_search_column_first_name=Sacha&wpda_search_column_last_name=Schulz&wpda_search_column_operator=or
Adds condition: first_name = ‘Sacha’ OR last_name = ‘Peter’
It is currently not possible to combine AND and OR conditions with URL parameters.