Add a Text & Voice Search Box to WordPress
A fast, Google-style search bar for any WordPress site. Instant text results, automatic voice search in every language, no plugin — and free to download.
Search is the fastest path between a curious visitor and the exact page they came for. Yet on most WordPress sites the built-in search is slow, reloads the whole page, and misses posts because of a single accent or a missing letter. This guide introduces a lightweight text and voice search box for WordPress that you can add to any site in a couple of minutes — and download for free. It works in every language, understands spoken queries, and never sends your visitors to a blank “no results” page when a close match exists.
Below you will find a complete, SEO-friendly review: what the tool does, why it helps both your readers and your rankings, a picture-by-picture installation walkthrough (including exactly what to change in the settings), how to download it, which browsers support voice, and answers to the questions people ask most.
Better search means better SEO and happier readers
On-site search shapes two things Google pays close attention to: engagement and satisfaction.
When visitors can find what they want, they stay longer, read more pages, and are far less likely to bounce back to the search results. Those behavioral signals — longer sessions, more pages per visit, lower pogo-sticking — are exactly the signals that correlate with healthy rankings.
Voice adds a second dimension. Spoken search has moved from novelty to habit, especially on phones, where a large and growing share of queries are voice-driven. Offering voice on your own site meets that expectation and keeps mobile visitors engaged instead of fighting with a tiny on-screen keyboard. There is also an accessibility benefit that quietly widens your reach: voice input helps people who find typing difficult, who have limited mobility, or who are simply searching on the move.
Finally, fast internal search encourages discovery. When a reader finishes one article and immediately finds three related ones, your average time on site rises and your content gets more of the attention it deserves. And every search your visitors run is an honest signal of what they expected to find — queries that come back empty point straight at gaps in your content, giving you a ready-made list of posts to write next. Good search is not just a convenience; it is a quiet engine for both retention and content ideas.
Everything the search box does
Deliberately small on screen, but rich in what it does.
Instant text search
Matching posts appear the moment the visitor types. The most relevant titles rise to the top and matched words are highlighted, so it is obvious why each result was suggested.
Voice in your site language
Tap the microphone and speak; the words appear live and the search runs when the visitor stops. The voice language follows your site automatically — no code editing to make it work in any language.
True multilingual matching
Works at the character level, not by assuming an alphabet. It ignores case and Latin accents, so “cafe” finds “Café.” For Arabic it unifies hamza forms, ta marbuta and alef maqsura, and ignores tashkeel and tatweel.
Typo tolerance
People misspell words and speech engines sometimes mishear one. A small margin of error on longer words means a query like “wordpres” still finds “WordPress” instead of ending in nothing.
RTL and LTR support
The layout adapts its direction to the language — right-to-left for Arabic, Persian and Urdu, left-to-right otherwise — and the placeholder, result count and every message are translated to match.
Works on large sites
It caches a generous batch of your latest posts for instant local search, and reaches the server for anything the cache does not hold. Search posts, pages, or custom types such as products.
Light and self-contained
No external libraries and nothing to slow your pages. It is isolated so it neither changes your theme nor is broken by it, can be placed more than once per page, respects “reduce motion,” and offers a dark mode.
Keyboard & accessibility
Press Enter to search, arrow keys to move through results, Escape to clear. Buttons carry proper labels for screen readers and clear focus outlines for mouse-free navigation.
Fast because it does the work locally
The flow is simple and happens almost entirely inside the visitor’s browser.
Fetch your content
On the first interaction, the widget quietly requests your published posts through the standard WordPress REST API and keeps them in memory.
Compare fairly
Each query is lowercased and stripped of accents and Arabic marks, then compared against the equally normalized titles and scored.
Instant results
The best matches appear immediately with the matching words highlighted on the original title text — no full-page reload.
Voice to search
If voice is used, the browser converts speech to text in your site language, fills the field and runs the same search. Large sites also get a quick server search to fill any gaps.
How to install the search box, step by step
One block of code, pasted once. No plugin, and nothing to configure for normal use — language, direction and the site address are detected automatically.
Add a Custom HTML block
In the WordPress block editor, click the “+” button and choose the Custom HTML block. On classic setups, use an HTML widget under Appearance → Widgets. Avoid the visual editor, which can strip the code.
Drop in the code and save
Paste the whole downloaded file into the Custom HTML block, then Publish or Update. The centered search bar appears immediately — on a standard site you are already done.
The user settings area
Near the top of the file is a short USER SETTINGS block — the only part you might touch. Everything has a safe default, so change a line only if you want something different. The two most common edits are highlighted below.
Here is the complete settings block exactly as it appears at the top of the file. Every line is optional and already set to a sensible default — edit only what you want to change:
window.WSR_CONFIG = { /* ---- 1. SITE ---- */ SITE_URL : "", // "" = this site. Fill only if the widget is on another domain: "https://www.your-site.com" /* ---- 2. LANGUAGE ---- */ LANG : "auto", // "auto" = site language. Or force one: "ar", "ar-MA", "fr", "en-US", "es", "de", "zh-CN"... VOICE_LANGS : [], // several voice languages, e.g. ["ar-SA","en-US","fr-FR"] shows a switch by the mic DIR : "auto", // "auto" | "ltr" | "rtl" PLACEHOLDER : "", // "" = translated automatically, or write your own text /* ---- 3. SEARCH ---- */ TYPES : ["posts"], // ["posts"], ["posts","pages"], or a custom type e.g. ["posts","product"] QUERY : "", // extra REST filters: "categories=3,7", "lang=fr" (Polylang), "exclude=12"... MAX : 20, // number of results shown PAGES : 5, // pages of 100 posts cached (5 = 500). Bigger sites also get a live server search PRELOAD : false, // true = load posts on page load (instant first search) ALL_LINK : true, // "Search the whole site" link (/?s=) under the results NEW_TAB : false, // true = open results in a new tab HOTKEY : "", // keyboard shortcut that focuses the box, e.g. "/" /* ---- 4. LOOK ---- */ THEME : "light", // "light" | "dark" | "auto" (follows the visitor's system) ACCENT : "", // "" = Google blue, or any color e.g. "#0f9d58" MAX_WIDTH : "600px", // "100%" to fill the container DATES : true, // show the post date OVERLAY : false // true = results float over the page (for headers) };
And here is what each setting does, grouped the same way:
| Setting | Default | What it does |
|---|---|---|
SITE_URL | "" | The site to search. Leave empty on your own WordPress site (it is detected). Set it only when the box is placed on a different domain than the content. |
LANG | "auto" | Interface and voice language. "auto" follows your site language; or force one such as "ar", "ar-MA", "fr-FR", "en-US". |
VOICE_LANGS | [] | For bilingual sites: list several voice languages, e.g. ["ar-SA","en-US"], and a small switch appears next to the microphone. |
DIR | "auto" | Text direction. "auto" picks it from the language; or force "ltr" or "rtl". |
PLACEHOLDER | "" | The hint text in the box. Empty means it is translated automatically; or write your own. |
TYPES | ["posts"] | What to search: posts, pages, or custom types such as WooCommerce products, e.g. ["posts","product"]. |
QUERY | "" | Extra REST filters, e.g. "categories=3,7", "lang=fr" (Polylang), or "exclude=12". |
MAX | 20 | How many results to show at once. |
PAGES | 5 | Pages of 100 posts cached for instant search (5 = 500). Larger sites also fall back to a live server search. |
PRELOAD | false | true loads the posts as the page loads, so the very first search is instant. |
ALL_LINK | true | Shows a "Search the whole site" link (to /?s=) under the results. |
NEW_TAB | false | true opens each result in a new browser tab. |
HOTKEY | "" | A keyboard shortcut that jumps to the box, e.g. "/". |
THEME | "light" | "light", "dark", or "auto" to follow the visitor's system setting. |
ACCENT | "" | The highlight color. Empty is Google blue; or set any color like "#0f9d58". |
MAX_WIDTH | "600px" | The width of the bar. Use "100%" to fill its container. |
DATES | true | Show or hide the post date beside each result. |
OVERLAY | false | true lets results float over the page instead of pushing content down — useful inside a header. |
The two you are most likely to touch are SITE_URL (keep it empty on your own site) and LANG (keep it "auto" unless your content language differs from your site language). Everything else can stay exactly as it is.
Where to place the widget
Drop it wherever your visitors look for search.
Header
The most used spot — a header widget area or the theme header, for site-wide reach.
Post or page
A Custom HTML block anywhere in the content — ideal for a dedicated search page.
Sidebar
An HTML widget in the sidebar so it follows readers as they browse.
Footer
A quieter, secondary search entry at the bottom of every page.
Zero setup needed. On a standard WordPress site you do not change a single line: the tool follows your site language from Settings → General → Site Language and detects your address on its own.
Keep the small “© Tooliqo.co” credit under the box — it is what keeps the tool free.
Download the search box
WordPress Universal Search — Text & Voice
Grab the single code file, paste it into a Custom HTML block, and give your visitors instant text and automatic voice search. No plugin, no account, works in any language.
Do you need to change the language in the code?
No. The search box reads your site language automatically and uses it for both the interface and voice recognition. An Arabic site gets Arabic voice, a French site gets French voice, and so on, with no editing at all.
One technical fact helps here: the browser’s speech engine cannot detect which language a person is speaking, and it can only listen for one language per session — a limitation of the technology, not of this tool. What the search box does is remove the manual work: instead of asking you to hard-code a language, it picks the right one from your site settings. For a genuinely bilingual audience, the VOICE_LANGS option shows a small language switch next to the microphone so visitors choose; for a normal single-language site everything is automatic.
This automatic approach matters most on mobile, where voice is used far more than on desktop and where typing long or non-Latin queries is slow. A visitor can tap the microphone, say a few words in their own language, and reach the right article without touching the keyboard — and thanks to the accent, mark and typo tolerance, even a slightly misheard word still lands on the correct result.
Browser support for voice search
Text search works everywhere. Voice depends on the browser’s built-in speech engine.
On browsers without a speech engine, such as Firefox, the microphone hides itself and text search keeps working perfectly — visitors are never shown a button that does nothing.
Versus the default WordPress search
| Capability | Default search | Universal Search |
|---|---|---|
| Results while typing | No, reloads page | Yes, instant |
| Voice input | No | Yes, auto language |
| Accent & mark tolerance | Limited | Yes |
| Typo tolerance | No | Yes |
| Right-to-left support | Theme-dependent | Automatic |
| Plugin required | Built in | None, paste once |
| Effect on page speed | Extra page loads | Minimal, one load |
Get the most from it, and fix the small stuff
Place it where people look
A search box in the header is used far more than one buried in the footer.
Write descriptive titles
Matching and ranking are title-driven, so clear, keyword-rich titles help visitors and your SEO at once.
Microphone missing?
Almost always means the site is not on HTTPS, or the browser has no speech engine (Firefox). Confirm https and try a Chromium browser.
No results at all?
Your REST API may be blocked by a security plugin or server rule. Re-enabling the standard REST API restores the tool.
Voice hears the wrong language?
Set the correct language under Settings → General → Site Language, or set LANG explicitly.
Looks odd in your theme?
Place the box in its own Custom HTML block rather than deep inside another styled container to avoid conflicts.
Frequently asked questions
Is the search box really free to download?
Yes. You can download it and add it to your WordPress site at no cost. Paste it into a Custom HTML block and it works immediately.
Do I need a plugin?
No. It is a single block of code, not a plugin — nothing to install from the plugin directory and nothing to update separately.
Does it slow down my website?
No meaningful slowdown. It loads your content once, in the background, then answers searches locally with no extra libraries.
Will it work in my language?
Yes. It follows your site language automatically for interface and voice, and its text matching works with any script, including Arabic and Chinese.
Do I have to edit the code to set the voice language?
No. The voice language is taken from your WordPress site language automatically. You only adjust LANG to deliberately override it or VOICE_LANGS to offer more than one.
Why is voice missing in Firefox?
Firefox does not include the browser speech engine the tool relies on. There, the microphone hides and text search keeps working.
Can I search pages and products too?
Yes. It can search pages and custom content types such as WooCommerce products in addition to posts.
Can I put more than one search box on a page?
Yes. Each copy runs independently, so header and in-post boxes coexist without conflict.
A small upgrade with an outsized effect
A great search box is one of the highest-return additions you can make to a content site. It shortens the distance between a visitor’s question and your answer, keeps mobile and voice-first users engaged, and quietly improves the engagement signals that support your rankings. This WordPress Universal Search box delivers all of that in a single, free, paste-once block — instant text search, automatic multilingual voice, accent and typo tolerance, and a clean, accessible design that respects your theme in both light and dark modes.
If your current search sends readers to dead ends or forces a page reload for every query, this is a simple upgrade worth making today. Download the search box for free, drop it into a Custom HTML block, and give your visitors a faster, friendlier way to find exactly what they came for.
Choose the version that fits you
Start free, or unlock a paid edition — a one-time payment, no subscription.
Full text & voice search for your own sites. Keeps a small “Tooliqo.co” credit under the box.
Download freeThe same tool with the on-page copyright hidden — a clean search box with no visible credit. For personal use on your own websites.
Get it — $1.99The full, source-available code you can read, modify and use in your personal and professional work — including on your clients’ sites. Not for resale.
Get the source — $19We accept a variety of payment methods, and our products are listed across our digital stores — open the links above to pick what suits you.
