1. Home
  2. Docs
  3. Data Publisher
  4. URL parameters

URL parameters

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 publications!

Examples

YOUR-URL/?wpda_search_column_first_name=Sacha
<input name="wpda_search_column_first_name" type="text" value="Sacha" />

Adds condition

first_name = 'Sacha'

Wilcards are supported in URL parameters as well

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

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.

Was this article helpful to you? Yes No

Leave a Reply

Your email address will not be published.