How to Add a Live Search Bar to a WordPress Table

A live search bar lets users type a keyword and immediately see the matching rows, without submitting a form or clicking a button. For tables with large amounts of text content, names, descriptions, notes, addresses, it is often faster than any combination of dropdown filters. This guide covers how to enable live search in TableCrafter, how to configure which columns it searches, how debouncing keeps it from hammering your server, and when to use global search versus per-column text filters. 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. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline. REST APIs handle over 83% of all web API traffic as of 2025 (RapidAPI, 2025).
How Do I Enable Live Search: The Shortcode Parameter?
TableCrafter's search bar is controlled by a single shortcode parameter:
[tablecrafter id="1" search="true"]
Adding search="true" renders a full-width search input above the table (and above any column filter bar if filters are also enabled). There is no builder toggle for search, it is purely a shortcode-level switch, which means you can enable it on some page embeds and hide it on others using the same table ID.
To combine search with filters and editing:
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.
[tablecrafter id="1" search="true" filter="true" edit="true" export="true"]
Which Columns Are Searched?
By default, the global search bar searches every visible column that has a text-compatible data type. Numeric, date, and boolean columns are excluded from the default search scope because searching for "5" across a table with ID and quantity columns produces confusing matches.
The searchable column set is the union of all columns whose Searchable toggle is enabled in the table builder. To check or change this:
- Open the table builder and click the column you want to include or exclude from search
- In the column settings panel, find the Searchable toggle (distinct from the filter toggle)
- Enable or disable it and save the column
Disabling the Searchable toggle on a column removes it from the global search scope without hiding it from the table or removing its column filter. A column can be filterable but not searchable, searchable but not filterable, or both.
How Does Search Debouncing Work?
Live search fires an AJAX request after each keystroke, but only after the user has paused typing for a set delay. This delay is called the debounce interval. Without it, typing "apple" would fire five sequential requests (a, ap, app, appl, apple) and each response could arrive out of order, causing the table to flicker or show stale results.
TableCrafter uses a 350-millisecond debounce by default. In practice, this means the search request fires roughly a third of a second after the user stops typing. For most users this feels instantaneous.
You can adjust the debounce interval globally in TableCrafter → Settings → Performance → Search Debounce (ms). Increase it (e.g. to 500ms) if your server is under heavy load or if your table queries many columns. Decrease it (e.g. to 200ms) if you want a snappier feel on a fast server with small datasets.
How Does Restricting Search to Specific Columns Work?
The Searchable column toggle described above is the primary tool for restricting search scope. However, there is also a shortcode parameter for runtime restriction:
[tablecrafter id="1" search="true" search_columns="name,email,company"]
The search_columns parameter accepts a comma-separated list of column slugs (the machine-readable key for each column, visible in the builder next to the column label). When this parameter is present, it overrides the Searchable column toggles for that specific embed. The same table could be embedded twice: once with broad search across all text columns, and once with search_columns narrowed to a single column for a focused use case.
If this step produces unexpected output, check the source data directly in the connected system. TableCrafter passes data through without modification — if a cell displays an unexpected value, the source record contains that value. Use the TableCrafter debug log (Settings > Advanced > Debug Mode) to trace the exact query sent to the source and the raw response received, which narrows the diagnosis to either a source-side or rendering-side issue.
What Is Global Search vs. Per-Column Text Filter: When to Use Each?
TableCrafter supports both a global search bar and per-column text filter inputs. They are not mutually exclusive, you can enable both simultaneously, but understanding their differences helps you choose the right tool for each use case.
- Searches across multiple columns at once
- Ideal when users do not know which column their value is in
- Single input, simpler UX
- Returns a row if any searched column matches
- Best for name/email/keyword lookups
- Searches within a single specific column
- Ideal when users know exactly which field to query
- Multiple inputs, more powerful for precision
- Can combine multiple column filters with AND logic
- Best for structured data: IDs, codes, addresses
A common pattern is to enable both: the search bar handles quick keyword lookups ("find anything with 'Chicago' anywhere") while per-column filters handle structured queries ("show only rows where Status = Active AND Region = Midwest"). This combination is covered in depth in the guide on combining search and column filters.
How Does Search Behavior at the Data Layer Work?
For Gravity Forms data sources, the global search translates to a field_filters block with mode: "any", meaning the entry matches if any of the specified fields contains the search term. For SQL-backed sources (WooCommerce, custom tables), it translates to a series of LIKE %term% conditions joined with OR. The search is case-insensitive in all cases.
The search term is sanitized before hitting the database: special SQL characters are escaped and the term is limited to 255 characters. Very long search strings are silently truncated at the server, so the user experience degrades gracefully rather than failing.
The shortcode accepts all column and filter settings defined in the table builder as defaults, but you can override individual parameters inline. For example, `[tablecrafter id="1" per_page="25"]` overrides the default rows-per-page setting for this specific embed without changing the saved table configuration. This lets you reuse one table definition across multiple pages with different display requirements.
How Do Placeholder Text and Search Input Label Work?
The default placeholder text inside the search bar is "Search..." To change it, go to TableCrafter → Settings → Labels and update the Search Placeholder field. This change applies globally to all tables. If you need per-table placeholder text, use the shortcode parameter search_placeholder="Search orders by name or email" to override it for a specific embed.
What Are the Next Steps?
Live search is the fastest way for users to find a specific record in a large table. Once it is working, consider enabling column filters alongside it, the guide on combining search and column filters explains exactly how the two systems work together and how the AND query logic produces a precise intersection of results.
Frequently Asked Questions
How Do I Enable Live Search: The Shortcode Parameter?
TableCrafter's search bar is controlled by a single shortcode parameter:
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.