Skip to main content

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​

SettingValue
Filter Posts Item → SourceSearch
Filter typeSearch (automatic)
Placeholder texte.g. Search products…
Filter Posts → Update methodOn 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).

DelayExperience
300–800 msSnappy live search; more server requests
1000–1500 msBalanced default for medium sites
2000+ msConservative; 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 methodSearch behaviour
On changeSearch fires after typing delay when text changes
On button clickVisitor 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​

SettingDescription
Placeholder textHint inside empty input
Enable number inputRestrict field to numeric input (specialized SKU/ID search)
Browser autocompleteAllow 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)​

note

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​

IssueCheck
Nothing searchesPost type mismatch; REST blocked; JS error in console
Search too slowIncrease typing delay; enable cache
Search ignores other filtersConfirm all items share Filter Posts container and post type
Special characters break URLURL encoding; caching plugin stripping s parameter

What's next​