Description
Raintech Product Search Bar for WooCommerce is a fast, modern WooCommerce product search plugin. It replaces the slow default WordPress search with a live AJAX search popup: visitors click your search bar (or press / or Ctrl/Cmd + K), the popup opens with the cursor already in the field, and matching products appear instantly as they type – with images, prices, stock status, categories, colour and size filters, price slider and sorting.
It is built for stores whose customers search by product name, SKU, batch number or LOT number, and for any shop that wants search that actually finds products – even when the visitor misspells a word, uses the plural, or leaves out an accent. Everything runs on your own server with a lightweight custom search index: no monthly fee, no external search service, no data leaving your site.
Support: raintech.pages.dev/contact
What is this plugin?
It is a complete product-search system for WooCommerce made of four parts that work together:
- The search bar and popup – a clean search field (shortcode, block, Elementor widget, widget, or your theme’s own search field) that opens a full-width popup with popular searches, recommended products, recent searches and live results.
- The search engine – a custom search index with relevance scoring, AND/OR matching, typo correction, synonyms, plurals, SKU, variation and custom-field search.
- The sidebar filters – categories, price range, “In stock only”, “On sale”, and product attributes such as colour, size or brand, shown as checkboxes, radio buttons, buttons, colour swatches or image swatches.
- The control panel – a clean settings page in WooCommerce → Product Search with an Index manager, search analytics, appearance options, and export/import of all settings.
Why store owners choose it
- Finds what people mean – typo correction (“hodie” finds “hoodie”), plurals, synonyms, accents and partial words.
- Finds products by code – SKU, variation SKU, product ID and any custom field such as batch or LOT numbers.
- Helps people narrow down – filter by category, colour, size, price, stock and sale status without leaving the popup.
- Fast – results come from an indexed table, not slow
LIKE '%…%'queries over post content. Optional result caching. - Works with your theme – use the shortcode, a block, an Elementor widget, or point the plugin at the search field you already have.
- Shows you what customers want – built-in search analytics reveal top searches and searches that find nothing.
- Privacy-friendly – no external services, no cookies, no personal data stored.
How it works (in plain language)
- You install the plugin and click Build index once. The plugin reads your products (title, description, SKU, categories, tags, attributes, custom fields, variations) and stores every searchable word in its own small database table.
- A visitor clicks the search bar. The popup opens and shows popular searches, recent searches and recommended products.
- As the visitor types, the plugin looks the words up in the index, ranks products by relevance (a match in the title counts more than a match in the description – you can change the weights), and returns results in a few milliseconds.
- If nothing matches, the plugin tries close spellings from your own catalogue and shows “Showing results for…” or “Did you mean…”.
- The visitor narrows results with the sidebar filters, then clicks a product – or “View all results”.
- When you add or edit a product, the index updates automatically.
Live search popup
- Click anywhere on the bar to open a full-width popup; the input is focused immediately (keyboard: Enter / Space)
- Popular searches and recommended products (featured, best sellers, newest or hand-picked) shown before the visitor types
- Recent searches, kept only in the visitor’s own browser, with a Clear link
- Live (AJAX) results while typing, or search-on-Enter if you prefer
- Search-term highlighting in titles
- Elegant loading states: skeleton placeholders and a progress line instead of “Loading…” text
- Mobile full-screen mode, “View all results” button, custom “nothing found” text, clear (×) button
- Keyboard shortcut:
/and/or Ctrl/Cmd + K - Smooth card design with hover effect and floating carousel arrows
Sidebar filters (new)
- Categories with product counts
- Product attributes – colour, size, brand or any global attribute, with live counts
- Five display styles per attribute: checkbox list, radio buttons (one value at a time), buttons, colour swatches, image swatches
- Colour swatches use the value’s name as a colour (“Red”, “#ff0000”) or a custom colour you pick per value
- Image swatches let you choose an image per value from the media library
- “In stock only” and “On sale” quick filters (shown only when they would change the results)
- Price range slider and sorting (relevance, price, newest, name)
- Reset filters button; filters clear automatically for a new search
- A dedicated Sidebar filters settings tab with a switch for every filter and a mapping table for attributes
Smart search engine
- Custom search index that stays in sync automatically when products are added, edited, trashed or deleted
- Relevance scoring with adjustable weights per source: title, content, excerpt, SKU/ID, categories, tags, attributes, custom fields
- AND / OR matching and an exact-match option
- Typo correction and “did you mean” suggestions
- Plural folding (capsule / capsules), accent-insensitive matching (café / cafe), stop words and single-word synonyms
- Search product attributes, taxonomies, custom fields and shortcode output
- Variations in results (found by variation SKU or attribute)
- Category and tag results shown beside products
- Result caching with automatic invalidation
Search by SKU, batch number and LOT number
Customers who know a part number don’t want to scroll. The plugin indexes the product SKU, every variation SKU, the product ID and any custom field you choose (for example batch_number or lot_number). Type a code – or part of it – and the right product appears at the top.
Use your existing search field (no shortcode needed)
Enter the class or ID of any search input already on your site (for example .search-field or #site-search) under WooCommerce → Product Search → Integrations. Clicking and/or focusing that field opens the popup. Turn on Seamless integration to take over common theme search forms automatically.
Control what appears
- Include or exclude categories and tags
- Show only in-stock, out-of-stock, on-sale or not-on-sale products
- Respect WooCommerce catalog visibility
- Hide individual products from search
- Show or hide image, description, categories, price, sale badge, SKU, stock status, rating, featured badge, out-of-stock items
Appearance
- Light, dark or “match visitor’s device” theme
- Adjustable popup width, corner roundness and backdrop darkness
- Your accent colour everywhere (buttons, focus, progress, filters)
- Looks consistent in any theme: styles are scoped to the popup
Search analytics
- See top searches and searches that found nothing – the quickest way to spot missing products, synonyms and spelling problems
- One click to add a term to Popular searches, or fill Popular searches automatically from real searches
- Stores only the term, count and whether anything was found – no IP addresses, no user data
- Choose how many days to keep records, or turn logging off
Integrations
- Gutenberg block, Elementor widget, shortcode and classic widget
- Google Analytics search events (gtag, Google Tag Manager dataLayer or analytics.js)
- Polylang and WPML – results follow the visitor’s language
- Works with full-page caching: public REST endpoints need no nonce
Admin tools
- Clean React-based settings page in WooCommerce → Product Search
- Index tab with batch rebuild and progress bar
- Export, import and reset all settings
- Unsaved-changes warning and a notice when the index needs rebuilding
Settings tabs at a glance
- Search bar – placeholder, minimum characters, accent colour, behaviour switches
- Search engine – sources and weights, AND/OR, exact match, typo correction, stop words, synonyms, suggestions
- Index – build/rebuild/clear, variations, custom fields (batch/LOT), extra taxonomies, auto-sync
- Appearance – theme, width, roundness, backdrop, keyboard shortcut, recent searches
- Results – products shown, which data to display, category/tag results
- Sidebar filters – filter switches and the attribute mapping (checkbox, radio, buttons, colour or image swatches)
- Filters – which products may appear (categories, tags, stock, sale, visibility, hidden products)
- Popular & recommended – popular searches and recommended products
- Analytics – top searches and searches with no results
- Integrations – existing search field, seamless mode, Google Analytics, language, cache, placement help
- Tools – export, import, reset
Accessibility
Focus trap, Esc to close, focus returns to the search bar, visible focus rings, screen-reader labels, labelled loading states and reduced-motion support.
Developer notes
- Public REST endpoints under
/wp-json/rtps/v1/:search,suggestions,log - Admin REST endpoints (require
manage_woocommerce):settings,products,terms,index/*,cache/clear,analytics - Source code in
src/(React + SCSS); compiled files are committed inbuild/
Shortcode
[raintech_search_bar]
[raintech_search_bar placeholder="Find a product"]
Development
Source is in src/ (React + SCSS). Compiled files are committed in build/.
npm install
npm run build (or `npm start` to watch)<h3>Privacy</h3>
The plugin makes no external requests and sets no cookies. If analytics logging is on, it stores aggregated search terms (term, count, result status, date) in your own database – no IP addresses or personal data. The visitor’s recent searches are stored only in their own browser.
Installation
- Upload the
raintech-product-search-bar-for-woocommercefolder to/wp-content/plugins/, or install the zip via Plugins → Add New → Upload Plugin. - Activate the plugin and make sure WooCommerce is active.
- Open WooCommerce → Product Search → Index and click “Build index” (needed once; products then stay in sync automatically).
- Add the search bar: place
[raintech_search_bar]in a page, header template or widget area – or add the “Product Search Bar” block / Elementor widget – or enter your existing search field’s class/ID under Integrations, or switch on Seamless integration. - (Optional) Open Sidebar filters to choose how colour, size and other attributes are displayed, and Appearance to pick light/dark theme and the keyboard shortcut.
FAQ
How do I add the search bar to my site?
Use the shortcode [raintech_search_bar] in a page, header template or widget area, add the “Product Search Bar” block in the block editor, drag the Elementor widget, or use the classic widget. You can also make your theme’s existing search field open the popup – see below.
Can I use my theme’s existing search field instead of the shortcode?
Yes. Under WooCommerce → Product Search → Integrations, enter the CSS class or ID of your existing field (for example .search-field or #site-search; separate several with commas). Choose whether clicking, focusing or both should open the popup. Turn on “Seamless integration” to replace common theme search forms automatically.
How do I search products by SKU?
SKUs are searched by default, including variation SKUs, which show the matching variation (or its parent product). You can raise or lower SKU importance under Search engine → Search in.
How do I search by batch number or LOT number?
Go to Index and add the custom field key that stores the number (for example batch_number or lot_number) to “Custom fields (meta keys)”. Re-index once and those values become searchable.
Why are there no results after installing?
Build the search index once under WooCommerce → Product Search → Index. Until then a basic fallback search is used. If you change an index-related setting, a notice asks you to re-index.
Does the index update when I edit products?
Yes. Adding, editing, trashing, restoring or deleting a product updates the index automatically. After large imports or changes to index settings, use “Re-index all products”.
Does it fix spelling mistakes?
Yes. If a search finds nothing, the plugin tries close spellings from your own catalogue and shows “Showing results for…”. You can turn this off under Search engine.
Does it support synonyms?
Yes, single-word synonyms (for example sofa, couch). Add one group per line under Search engine → Synonyms. Phrase synonyms are not supported.
What is the difference between AND and OR matching?
AND shows only products that match every word the visitor typed. OR shows products matching any word, ranked by how many words they match.
Does it work with product variations?
Yes. Variations are indexed by SKU and attributes. Turn “Show variations as separate results” on or off under Results.
Can visitors filter by colour, size or other attributes?
Yes. Global product attributes (Products → Attributes) appear in the popup sidebar. For each attribute you choose how it is displayed – checkbox list (default), radio buttons (one value at a time), buttons, colour swatches or image swatches – under Sidebar filters → Attribute filters. Values within one attribute combine with OR, different attributes with AND, and counts update as filters change.
How do I show colour swatches or images for attribute values?
Under Sidebar filters → Attribute filters, set the attribute to “Colour swatches” or “Image swatches” and click “Set colours” or “Set images”. For colours you can pick a custom colour per value (otherwise the value’s name, such as “Red”, is used). For images you choose a picture per value from the media library.
Can I show only some attributes?
Yes. Use the switch next to each attribute in the mapping table. Only attributes that actually appear in the current results are shown to visitors.
Can visitors show only in-stock or on-sale products?
Yes. “In stock only” and “On sale” quick filters appear in the sidebar when they would change the results. Each can be turned off under Sidebar filters.
Can I hide certain products or categories from search?
Yes. Use the Filters tab to include or exclude categories and tags, limit by stock or sale status, respect catalog visibility, or hide individual products by name or SKU.
Can I change how the popup looks?
Yes. The Appearance tab lets you choose light, dark or automatic theme, popup width, corner roundness and backdrop darkness. The accent colour is on the Search bar tab.
Is there a keyboard shortcut?
Yes. Turn it on under Appearance: /, Ctrl/Cmd + K, or both. The / key is ignored while the visitor is typing in a field.
What are recent searches?
A short list of the visitor’s own last searches shown before they type. It is stored only in their browser (localStorage), never on your server, and they can clear it with one click.
Which pages load the plugin’s scripts?
Pages that contain the shortcode, widget or block. If you set an existing-field selector, turn on Seamless integration or enable a keyboard shortcut, the script loads on every page so the popup is always available.
Does it work with Elementor?
Yes. There is a “Product Search Bar” widget in the Elementor panel. You can also use the shortcode in an Elementor shortcode widget.
Does it work with the block editor / block themes?
Yes. Add the “Product Search Bar” block, or place the shortcode in a Shortcode block, a template part or the Site Editor.
Does it work with WPML or Polylang?
Yes. Results are filtered to the visitor’s current language, and the index stores each product’s language.
Does it work with caching plugins and CDNs?
Yes. Search uses public REST endpoints that do not require a nonce, so cached pages keep working. You can also enable the plugin’s own result cache for repeated searches.
Can I track searches in Google Analytics?
Yes. Turn on Google Analytics events under Integrations. The plugin sends a search event with the search term using gtag, the GTM dataLayer or analytics.js, whichever your site already has.
What does the search analytics tab record?
Only the search term, how many times it was searched, whether the last search found products, and the date. No IP addresses, user IDs or cookies. You can delete any term, clear everything, set a retention period or switch logging off.
How can I use the analytics to get more sales?
Look at “Searches that found nothing”: each one is a product, synonym or spelling you are missing. Add a synonym, add the product, or add the term to Popular searches. Then check “Top searches” to see what customers want most and feature it.
Does it store anything about my visitors?
No personal data is stored. Recent searches are kept only in the visitor’s own browser and are never sent to your server.
Will it slow my site down?
Search runs on an indexed table and averages a few milliseconds per query on a typical catalogue. The popup script is small and loads only where needed.
How is this different from the default WooCommerce / WordPress search?
The default search scans post content with slow queries, ignores SKUs of variations and custom fields, has no typo tolerance, no filters, and no live results. This plugin uses a dedicated index with relevance ranking, finds SKUs and batch/LOT numbers, fixes typos, and adds a live popup with filters.
Do I need a paid search service?
No. Everything runs on your own WordPress and database. There are no external requests and no monthly fees.
Can I move my settings to another site?
Yes. Use Tools → Export settings and Import settings. The search index and analytics are not included in the export.
What happens to my data if I uninstall?
Deleting the plugin removes its settings and database tables (the search index and the analytics log).
Where do I get help?
Contact support at https://raintech.pages.dev/contact.
Screenshots











Changelog
1.1.0
- New: Sidebar filters tab with a switch for every filter and an attribute mapping table.
- New: attribute filters (colour, size, any global attribute) with five display styles – checkbox, radio, buttons, colour swatches, image swatches – plus per-value colours and images.
- New: “In stock only”, “On sale” and “Reset filters” in the popup sidebar.
- New: custom search index with automatic sync, relevance weights, AND/OR matching, exact match, synonyms, stop words and typo correction.
- New: category and tag results, suggestions, highlighting, variations, product data toggles and filter rules.
- New: seamless theme-form replacement, Gutenberg block, Elementor widget, Google Analytics events, Polylang/WPML support and result caching.
- New: Appearance tab (light/dark/auto theme, popup width, roundness, backdrop) and keyboard shortcut.
- New: recent searches, search analytics (top and no-result searches), popular searches from real searches, hide products, settings export/import/reset.
- New: elegant loading states (skeleton placeholders, progress line), refined cards, floating carousel arrows, tighter card spacing.
- New: full-width search modal built with React and SCSS; open the popup from an existing site search field via CSS selector.
- Changed: default placeholder is now “Search for product or SKU”.
- Changed: REST API (
rtps/v1) replaces admin-ajax. - Fix: version constant now matches the plugin header.
- Requires WordPress 6.6+.
1.0.1
- Initial release (dropdown search).