00000000
Table of Contents
Video tutorial
Search/filter tables via URL
If you want to open the tables pre-filtered by some specific value; for example, if you would like to create one table, but open it by several links pre-filtered by a specific value, you can do so by using a special URL key.
As an example, 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 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 URL
You can also predefine column filter values for the table in the URL, which may come in handy. For example, when you want to send your client a deeplink with some info from your catalog that is 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 want 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.,
(see the URL part after “?” and check the table output)
The values parsed from this URL will be used as default filter values.
If you want to use it for range filters you will separate values with pipe (“|”). You can check that with this link below:
Passing Placeholders through URL
Starting from wpDataTables version 6.4, you can pass values for our dynamic placeholders in the URL.
If you set a variable placeholder as a predefined column filter value for any table type or use it in a Query for an SQL Query-based table, you can pass or change the VAR1 value by appending it to the page URL:
?wdt_var1=your_value
To add multiple variables such as VAR1 and VAR2, separate them with an ampersand (&):
?wdt_var1=your_value&wdt_var2=second_value
Read more
It is also possible to pre-filter by individual columns. Click here to see a manual.
- Creating editable tables and filling the table data manually
- Creating non-editable tables from Excel files
- Creating non-editable tables from Google Spreadsheets
- Responsive design
- Conditional formatting
- Sorting tables
- Per-column filtering
- Row grouping
- Using Placeholders – Adjusting MySQL queries dynamically based on shortcode attributes
- Calculating totals for columns, sum row
- Table Layout, Word Wrap
- Table data export tools
- WPBakery Page Builder