How to Combine Search and Column Filters in a WordPress Table

Updated July 2026 • 7 min read • By Fahad Murtaza

TableCrafter live search, sorting, filtering, and pagination out of the box
TableCrafter live search, sorting, filtering, and pagination out of the box

Search and filters are more powerful together than either is alone. A user might type a company name in the search bar while simultaneously selecting "Active" from the Status filter, they want only Active rows that mention that company. TableCrafter supports this combination natively: both inputs are active at the same time, the query applies AND logic, and users can clear everything with a single click. This guide explains how to configure it, how the query is constructed, and how to make the UX clear when multiple filters are in effect. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers, and no per-row limits on the free tier. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Shortcode embeds remain compatible with 100% of WordPress themes regardless of page builder (WordPress Codex).

How Do I Enable Both Search and Filters?

Activate both features with their respective shortcode parameters:

[tablecrafter id="1" search="true" filter="true"]

Both parameters must be present. Setting search="true" alone shows the search bar but no column filters. Setting filter="true" alone shows column filter inputs but no search bar. With both active, the rendered layout from top to bottom is:

  1. Search bar (full-width input labeled "Search...")
  2. Column filter bar (one input per filterable column)
  3. Table header row
  4. Table body rows

On mobile, both bars stack vertically and each input is full-width, maintaining usability on narrow screens.

The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.

How Does the AND Query Logic Work?

When a user has both a search term and column filter values active, TableCrafter combines them using AND logic at the server, every condition must be true for a row to appear.

The AJAX request payload looks like this when a user has typed "Smith" in the search bar and selected "Active" from the Status filter:

POST /wp-admin/admin-ajax.php
Action: gt_get_table_data

{
  "table_id": 1,
  "search": "Smith",
  "filters": {
    "status": "Active"
  }
}

The server processes this as: return rows where (any searchable column contains "Smith") AND (status equals "Active"). A row must satisfy both conditions to be included.

This is important to communicate to users, because it can produce an unexpectedly empty table. If no Active entries mention "Smith," the table shows zero rows even though entries for Smith exist (with a different status) and Active entries exist (belonging to different people). The design implication is that users need visual feedback about all active conditions, not just the one they most recently changed.

How Does Multiple Active Column Filters Work?

Each column filter is an independent AND condition. If three column filters are active simultaneously, all three must be satisfied:

This produces: Active AND Midwest AND Premium rows only. The more filters a user activates, the more restrictive the result set. The row count displayed below the table ("Showing X of Y rows") updates after every filter change, giving real-time feedback on how restrictive the current combination is.

Within a single multi-select filter, the logic is OR (Pending OR Approved). Across different columns and the search bar, the logic is always AND. This is the standard pattern in faceted search interfaces and matches what most users expect from experience with e-commerce product filtering.

TableCrafter re-fetches this data on each page load by default. If your data source updates infrequently and your site has significant traffic, enable the built-in caching option in the table's Performance tab. This stores the fetched data for a configurable number of minutes and serves it from WordPress transients, reducing API calls to the source and improving page load time for visitors.

What Is the UX of Multiple Active Filters?

TableCrafter surfaces active filter state in several ways:

Active Filter Indicators

Any filter input that has a value shows a filled icon (the funnel turns from gray to blue). The search bar background changes to a light tint when it contains a term. These micro-signals let users scan the filter bar quickly to understand what is active.

Active Filter Summary Bar

When two or more conditions are active simultaneously, an Active Filters summary bar appears between the filter bar and the table header. It lists each active condition as a removable chip: "Search: Smith ×", "Status: Active ×", and so on. Clicking the × on a chip removes that single condition. This bar only appears when multiple conditions are active, a single active filter does not trigger it, as the visual state of the input itself is sufficient feedback.

Clearing All Filters at Once

A Clear All Filters button appears at the right end of the filter bar whenever any filter or search term is active. Clicking it resets the search bar to empty, clears all column filter values, and re-fetches the full unfiltered dataset. This is the fastest path back to the default view.

Place a clear visual affordance for "Clear All" near the filter bar in your page design. Users who apply many filters sometimes struggle to return to the default view if the Clear All button is not immediately visible. If your table is wide and the button scrolls off-screen horizontally, consider setting a max-width on the filter bar container via CSS.

How Does Order of Operations Does Not Matter Work?

Users can apply filters in any order: search first then filter, or filter first then search. The query is always rebuilt from scratch on every interaction. There is no cascading filter where earlier selections constrain the options available in later dropdowns — that is faceted search (also called dependent filtering), a different and more complex pattern not currently in TableCrafter's filter system. The current result set reflects all active conditions at the moment of the last request, regardless of which order the user activated them.

This means a user who types "Smith" in the search box and then selects "Pending" in the Status filter gets the same result as a user who selects "Pending" first and then types "Smith". Both yield rows where the text "Smith" appears in any searchable column AND the Status value is "Pending". The conditions are AND'd together at the database level — adding more conditions narrows the result set, it never expands it. If a user is confused about why the table shows fewer rows than expected, they should check which filters and search terms are currently active in the filter bar and clear any they did not intend to apply.

How Does Practical UX Patterns That Work Well Work?

These combinations appear frequently in TableCrafter deployments and perform well:

The configuration you set here applies to every visitor who loads a page containing this table, regardless of whether they are logged in. Role-specific overrides for columns and rows are a separate layer and do not replace these global display settings. Apply global settings first, then add role restrictions as needed for tables that serve multiple user types.

When AND Logic Is Too Restrictive?

If your users need OR logic across different columns ("show me rows where Status is Pending OR the Owner is Smith"), AND logic will not serve them. TableCrafter does not support cross-column OR logic in the filter UI, that requires a custom query that falls outside the filter system. In practice, this need is rare for structured table data; most users expect AND logic when combining different filter fields.

Within a single column, multi-select filters do provide OR logic (Status = Pending OR Approved). If your use case requires OR behavior, consider restructuring to keep the OR conditions within a single column's multi-select rather than spanning columns.

This step completes the connection between your data source and the TableCrafter table engine. Once saved, the plugin caches the connection credentials in the WordPress options table and uses them on every subsequent page load. If you update the source configuration later — for example, rotating an API key or changing a sheet URL — return to this step, enter the new value, and save again. The table updates immediately on next load without any shortcode changes.

What Are the Next Steps?

Combined search and filtering covers most interactive data table use cases. If your users navigate away from the table and need their filters to persist when they return, across page loads and back-button navigation, the guide on sticky filters explains how to enable filter state persistence using localStorage and URL parameters.

Frequently Asked Questions

How Do I Enable Both Search and Filters?

Activate both features with their respective shortcode parameters:

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.