Recommended Free Tools
The simplest current method is to create a Google Programmable Search Engine (PSE), then place its Standard Search Element on your WordPress site. The Standard Search Element is free but displays ads. You can add it with a Custom HTML block, a site-wide code-snippet plugin such as WPCode, or a WordPress search plugin that embeds the element.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
Do not start a new integration with Google’s Custom Search JSON API: it is closed to new customers and is scheduled for discontinuation on January 1, 2027. The paid, ad-free Search Element is also closed to new customers, so the Standard Search Element is the practical Google-hosted choice for a new site in 2026.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesChoose the right Google search method first
WordPress has a built-in search, but it only searches the content and taxonomies your WordPress installation exposes. A Google-powered search can search pages across a defined domain and use Google’s result presentation. The trade-off is control: the free Standard Search Element includes ads, and its appearance and ranking are managed by Google rather than by your WordPress theme.
| Method | What it does | Cost and availability | Best use |
|---|---|---|---|
| Standard Search Element | Embeds a Google Programmable Search Engine in a page, widget, or template. | Free; ads are shown. | New WordPress sites that want a supported, low-maintenance Google search box. |
| Custom Search JSON API | Returns search results as data so a developer can build a custom interface. | 100 queries per day free, then $5 per 1,000 queries up to 10,000 per day; closed to new customers and scheduled to end January 1, 2027. | Existing customers maintaining a legacy integration, not a new 2026 build. |
| Paid Search Element | An ad-free version of the hosted search element. | $5 per 1,000 queries; closed to new customers. | Existing accounts that already have access. |
| WordPress plugin wrapper | Places Google’s element through a settings screen, widget, or plugin-generated shortcode. | Depends on the plugin; some plugins call the JSON API. | Editors who prefer plugin settings, provided the plugin uses the Standard Search Element rather than a retiring API. |
A plugin README may quote €5 per 1,000 queries after the first 100 free per day. That is a third-party statement in euros, not Google’s published price, and should not be used to budget a new Google integration.
#1 Best Overall
What you need before setup
- A WordPress site where you can publish a page or edit a widget.
- Permission to create a Programmable Search Engine in Google’s Control Panel.
- The domain or domains that the engine is allowed to search. Enter the production domain you want visitors to search, including any separate subdomain that contains content.
- A page, widget area, or template location for the search box and results.
- A way to add HTML or JavaScript safely. A Custom HTML block works for a single page; a code-snippet plugin is usually safer for site-wide placement than editing theme files.
Take a backup or confirm that your host can restore the site before adding code. A malformed edit to a theme file can make the front end or WordPress administrator unavailable. A snippet plugin isolates the code from theme updates, but it still needs to be tested on a staging site when possible.
Create a Programmable Search Engine
Google’s normal workflow is to create the search engine in the Programmable Search Engine Control Panel first. The exact labels can change, so treat the following as the current sequence rather than a promise that every screen will look identical.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →- Open the Programmable Search Engine Control Panel. Sign in with the Google account that should own the engine.
- Create a new engine. Add the WordPress domain or the specific sites you want searched. If your site uses a separate blog, store, or documentation subdomain, include it deliberately rather than assuming the main-domain entry covers every host.
- Review search options. Setup guides commonly recommend enabling image search when image results are useful and enabling SafeSearch for a general audience. These are configuration choices, not requirements; check the live controls in your account before relying on either setting.
- Save the engine. The control panel provides a search-engine identifier and an embed-code option.
- Copy the search-engine ID or complete embed code. Keep the value in a password manager or your site’s documentation. You will need it when changing the WordPress placement or rebuilding the page.
Limit the engine to content you are entitled to search. If the domain list is too broad, results can include staging hosts, private areas, or unrelated subdomains. If it is too narrow, visitors will see an apparently broken search because valid pages are outside the engine’s scope.
Add the search box to WordPress
Option 1: Add the generated code to a page
This is the shortest route when you want a dedicated search page.
Rank #2
- In WordPress, create or edit the page that will contain search.
- Add a Custom HTML block in the block editor.
- Paste the embed markup supplied by the Programmable Search Engine Control Panel. If the control panel gives you a container element plus a script, paste both parts exactly; do not replace the search-engine ID with your site URL.
- Publish or update the page.
- Open the public URL in an incognito window and run several searches, including a phrase that should return a known article and a phrase that should return no results.
For a classic-editor site, use the HTML/Text editor rather than the visual editor so WordPress does not convert or remove the markup. A page-level embed does not automatically create a search field in your header or sidebar; use one of the placement methods below for that.
Option 2: Use a universal code snippet
A snippet plugin is useful when you want the search available in a header, footer, widget, or several templates without modifying the active theme. Guides commonly recommend WPCode’s Universal Snippet approach. This is a WordPress-community recommendation, not a Google requirement.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Install and activate a maintained code-snippet plugin that supports universal HTML or JavaScript snippets.
- Create a new universal or site-wide snippet.
- Paste the complete Programmable Search Element code from Google’s control panel, or paste the exact script and container markup required by your engine ID.
- Choose the display location. Use a site-wide location only if you want the search on every page; otherwise target the search page or selected widget area.
- Save the snippet, enable it, clear any page cache, and test the public site.
Do not paste a JavaScript embed into a field that strips scripts, such as a plain text widget configured for automatic escaping. If the snippet plugin offers HTML, JavaScript, and PHP modes, choose the mode that matches Google’s generated code. Never convert the embed into PHP unless the plugin’s documentation specifically requires it.
Option 3: Use a WordPress search plugin
Plugins can provide a settings screen, widget, or shortcode that places the Google element for you. This can be convenient for editors who do not want to handle markup, but plugin quality and maintenance vary. Before installing one, inspect its documentation and source settings for the service it calls.
- Prefer a plugin that embeds the Standard Search Element using your Programmable Search Engine ID.
- Be cautious with plugins that require an API key, daily query quota, or a JSON response template. They may depend on the Custom Search JSON API, which is closed to new customers and scheduled to discontinue on January 1, 2027.
- Check the plugin’s compatibility with your WordPress version, its update history, and whether it has a clear uninstall path. Current maintenance status was not established for every plugin available in the directory.
- If a plugin supplies a shortcode, insert the shortcode only where that plugin documents it and verify the result on the live page. A shortcode name seen in an old guide is not proof that it still works.
After activation, inspect the rendered page source or browser developer tools. You should see the Google search element and your engine identifier, not an error message from a missing API endpoint.
Should you edit the theme files?
Direct edits to header.php, footer.php, or a page template can work, but they are the least forgiving option. A theme update can overwrite the change, and a misplaced character can produce a PHP or markup error. If you must edit a template, use a child theme, keep a copy of the original file, and test the change before activating it on a production site. For most sites, a page block or universal snippet is safer.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallConfigure the WordPress page around the element
Give the results page a stable URL
Create a readable page slug such as /search/ or /find/ and keep it stable after you publish links to it. If you move the element later, redirect the old URL rather than leaving bookmarks and navigation links broken.
Make the page usable on a game site
For a video-game site, place the search field where readers already expect navigation: the header, a mobile menu, or a dedicated search page. Test titles, platform names, series names, and punctuation-heavy queries. A reader may search for a title containing a colon, a year, an edition label, or a console abbreviation; verify that the displayed results remain legible on narrow screens.
Rank #4
The Standard Search Element controls its own result layout. Your theme can still control surrounding margins, heading hierarchy, background color, and responsive spacing. Avoid CSS rules that hide form controls, set an extremely small font size, or force the results container to a fixed width.
Publish and test before announcing it
Use this checklist after saving the page or enabling the snippet:
- Open the public page while logged out of WordPress.
- Search for an article whose URL and title you know.
- Search for a distinctive term that appears in the body of a known article.
- Try an unmatched phrase and confirm that the page gives a clear no-results state rather than a blank area.
- Submit the form with the keyboard and test on a phone-sized viewport.
- Open a result in a new tab and confirm that it goes to the expected canonical URL.
- Check that ads, if shown, do not overlap the search field or obscure result titles.
- Clear your WordPress, server, and browser caches if the element is missing after a code change.
- Test in at least two modern browsers. A browser extension that blocks scripts can make the element appear broken for one tester but not another.
Costs, limits, and the 2027 API change
The product names sound similar, but their availability is materially different.
| Service | Published pricing or allowance | New-customer status | Ad behavior |
|---|---|---|---|
| Standard Search Element | Free. | Available as the normal hosted element. | Ads are shown. |
| Non-profit Search Element | Free. | Eligibility requirements were not verified; confirm them with Google before relying on this route. | No ads, subject to eligibility. |
| Custom Search JSON API | 100 queries per day free; $5 per 1,000 queries after that, up to 10,000 queries per day. | Closed to new customers; scheduled for discontinuation on January 1, 2027. | API responses are data; your own interface determines presentation. |
| Paid Search Element | $5 per 1,000 ad-free queries. | Closed to new customers. | Ad-free for accounts that already have access. |
The $5 figures are Google’s stated dollar prices for the API and Paid Search Element. They should not be confused with a plugin author’s euro-denominated estimate. Usage accounting, account eligibility, and regional terms can change, so check the controls in the Google account that owns the engine before committing to a paid architecture.
Best Value
The January 1, 2027 end date matters even if a legacy plugin works today. A new WordPress site built around the JSON API could require a migration soon after launch, and a plugin update cannot reopen an API that Google has closed to new customers. If you need a custom, ad-free interface and do not already have access to the Paid Search Element, evaluate a different search service rather than designing around this retiring API. Google has pointed site-restricted users toward Vertex AI Search in a search summary, but the appropriate product, pricing, and eligibility should be confirmed directly with Google.
Indexing and noindex pitfalls
Adding a search box does not guarantee that Google will index the results page or every article you expect to find. A common WordPress mistake is setting the search results page to noindex while expecting that page to appear in search results. Review the page’s SEO settings, WordPress reading settings, robots directives, and any SEO plugin’s advanced controls.
The search page itself usually does not need to rank for every query; the important check is that the underlying articles are crawlable and that your engine is limited to the correct production domain. Do not remove a deliberate noindex directive from private, thin, duplicate, or internal pages merely to make the search look fuller. Instead, confirm that the pages you want readers to discover are published, linked internally, and not blocked by access controls.
Troubleshoot the most common failures
The page shows an empty area
- Confirm that both the container markup and the script from Google’s control panel were pasted.
- Check that the engine ID has no extra spaces or quotation-mark changes.
- Look for a script-blocking consent tool, security plugin, or browser extension.
- Clear caches and view the page source to ensure the code is present on the public page.
The search returns unrelated or missing pages
- Review the domain and subdomain list in the Programmable Search Engine Control Panel.
- Check whether the pages are publicly accessible and already discoverable to Google’s crawler.
- Allow time for Google’s index to update after publishing new content; a newly published article may not appear immediately.
- Remove staging or development hosts that were accidentally included in the engine.
A plugin asks for an API key or stops working
Identify the service the plugin calls before changing credentials. A plugin built on the Custom Search JSON API may be affected by the new-customer closure and the January 1, 2027 discontinuation. Replacing the API key will not convert that integration into a Standard Search Element. Migrate to Google’s generated element or replace the plugin while you still have access to the old site configuration.
The search works in the editor but not for visitors
- Check that the snippet is enabled for the front end rather than administrator-only views.
- Verify that the page is published, not scheduled or private.
- Inspect caching and optimization settings that combine, defer, or remove external scripts.
- Test while logged out and on a second network to separate permission and cache problems.
The results page is visually broken
Remove theme CSS that applies fixed widths, aggressive form resets, or overflow:hidden to the search container. Test at mobile widths and after switching temporarily to a standard theme. If the element works with the standard theme, restore your theme rules one group at a time until you find the conflict.
Keep the integration maintainable
- Record the engine ID, allowed domains, page URL, and the WordPress location where the code is installed.
- Keep a copy of the original Google-generated embed code before modifying surrounding markup.
- Review the engine after major domain, permalink, or subdomain changes.
- Re-test after WordPress, theme, optimization-plugin, or consent-plugin updates.
- Monitor whether the search still returns current articles and whether ads or layout changes affect readability.
- Set a reminder before January 1, 2027 if any existing component uses the Custom Search JSON API.
For most new WordPress sites, the durable setup is deliberately simple: create a domain-restricted Programmable Search Engine, embed the free Standard Search Element through a page block or maintained snippet, and test indexing and responsive behavior on the published site. Use a plugin only when it clearly wraps that supported element rather than hiding a dependency on the retiring JSON API.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




