Live Search
Keyword search is a Filter Posts Item with source Search. It adds a text field that queries post titles and content (and product data for WooCommerce) through the same AJAX pipeline as taxonomy and price filters.
Live search means results update as the visitor types—without submitting a form—when the parent Filter Posts block uses On change update method.
Basic setup
| Setting | Value |
|---|---|
| Filter Posts Item → Source | Search |
| Filter type | Search (automatic) |
| Placeholder text | e.g. Search products… |
| Filter Posts → Update method | On change |
Add the item inside Filter Posts with the same post type as your Archive Loop.
Tutorial: Product search filter.
Typing delay
Search settings → Typing delay controls milliseconds to wait after the last keystroke before AJAX runs (default: 2000 ms).
| Delay | Experience |
|---|---|
| 300–800 ms | Snappy live search; more server requests |
| 1000–1500 ms | Balanced default for medium sites |
| 2000+ ms | Conservative; visitor pauses before search fires |
Lower delay feels responsive but increases load on shared hosting. Pair with caching for high-traffic catalogs.
Update method interaction
| Filter Posts update method | Search behaviour |
|---|---|
| On change | Search fires after typing delay when text changes |
| On button click | Visitor types freely; clicks Search to apply keyword |
Use button mode on large catalogs if live search generates too many requests.
Combining search with other filters
Search parameters stack with taxonomy, price, and attribute filters:
Category: Hoodies + Search: "zip" → hoodies matching "zip"
All active filters must match (AND logic across filter items unless an item defines OR for its own multi-select).
Enable URL sync so search terms appear in shareable links:
https://example.com/shop/?s=jacket&product_cat=outerwear
Search-specific options
| Setting | Description |
|---|---|
| Placeholder text | Hint inside empty input |
| Enable number input | Restrict field to numeric input (specialized SKU/ID search) |
| Browser autocomplete | Allow or block browser suggestion dropdown |
Result count and empty states
Search with no matches shows the Archive Loop no results message. Customize that text on Archive Loop → Elements / Design.
Other filter items with empty options may hide unrelated facets after search narrows the catalog.
Auto Suggest (Pro)
Auto Suggest—dropdown suggestions while typing based on product/post titles—requires WPEnhanced Ajax Filter Blocks Pro. Free search still filters results after the typing delay without a suggestion list.
Pro Auto Suggest complements live search for large WooCommerce stores where visitors need help discovering exact product names.
Performance tips
- Enable transient caching for repeated queries
- Use sensible typing delay on mobile (slightly higher reduces accidental triggers)
- Limit Archive Loop post count so search results pages stay fast
- For very large sites, consider dedicated search plugins only if you outgrow AJAX keyword search
Accessibility
Provide a visible label (Show label + custom label) for screen readers. Placeholder alone is not a substitute for a label. Ensure focus styles remain visible after AJAX refresh (theme-dependent).
Troubleshooting
| Issue | Check |
|---|---|
| Nothing searches | Post type mismatch; REST blocked; JS error in console |
| Search too slow | Increase typing delay; enable cache |
| Search ignores other filters | Confirm all items share Filter Posts container and post type |
| Special characters break URL | URL encoding; caching plugin stripping s parameter |
What's next
- Common filter setups — Blog and product search recipes
- Filter Posts Item block — Search settings reference
- Auto Suggest — Pro suggestion dropdowns