Join WPMU DEV to improve search with

Custom Google Search

If you’re looking for a way to give your site search a power boost, this is it. Replace the default WordPress search engine with search powered by Google. Search your entire site from posts and pages to pop-ups and sidebars.

Downloads 29,445
Ultra Compatible
Version 1.2.3

Changelog / Translations

Version 1.2.3
  • Fixed: Search page detection
  • Fixed: Replace old google API with new google API
  • Fixed: Search icon was not working
Version 1.2.3
  • Fixed: Search page detection
  • Fixed: Replace old google API with new google API
  • Fixed: Search icon was not working

Version 1.2.2
  • Added option to choose different methods of displaying search results
  • Fixed security issues

Version 1.2
  • Added option to open clicked search result in same window
  • Fixed search result page use of incorrect(WordPress Admin) URL

Version 1.1
  • CGS has been upgraded to API v2
  • Pasting API v2 embed codes now properly determines your unique embed id
  • Fixed IE8 and IE9 Problems With Searching
  • Custom Google Search class is now globalized for accessing internal functions
  • Added global function cgs_generate_search_box();

Version 1.0.2
  • Fixed structure of HTML on Search page;

Version 1.0.1
  • Fixed notice;

Version 1
  • Initial release;
Replace the default WordPress search engine with search powered by Google.
  • Results on a page, a pop-up, or sidebar
  • Improves built-in WordPress search
  • Integrate Google's search results
  • Custom styles for search results
  • Search your own sites or Multisite
  • Adds search box to your sidebar

Custom Google Search leverages the awesome power of the world’s number one search engine to enhance your sites search results.

Activate this plugin and instantly make the search tool on your site infinitely more powerful.

Eliminate lists of irrelevant results with search powered by Google.

Get better search results instantly

Enhanced WordPress search

Make sure your users always find what they are looking for. Enhance WordPress with the most powerful search engine on the web.


For help with installing plugins please refer to our Plugin installation guide.

Once installed login to your admin panel for WordPress or Multisite and activate the plugin:

  • On regular WordPress installs – visit Plugins and Activate the plugin.
  • For WordPress Multisite installs – Activate it blog-by-blog (say if you wanted to make it a Pro Sites plugin), or visit Network Admin > Plugins and Network Activate the plugin.

Once activated, you’ll see a new menu item in your admin: Settings > Custom Google Search.

Google Custom Search Menu

Create a custom search engine at Google

To use the plugin, you’ll first need to create a custom search engine through Google, you can do that here: Google Custom Search

Simply select to create a new search engine, you’ll then see a few options.

Google Custom Search - New search engine

1. Enter the sites you wish to search.

2. Enter a name of the custom search.

3. Click the CREATE button to create the search engine.


You’ll see a Congratulations page, where you’ll be presented with a few buttons.

Google Custom Search - Get code

Click the ‘Get code‘ button.

You’ll be taken to a page displaying the HTML script code you’ll use to include your custom search in your site.

Google Custom Search - Code

Select the code, then copy it to your computer’s clipboard (press CTRL-C on PC, CMD-C on Mac).

We’ll use that copied code within the plugin’s settings.

Configure the Settings

Let’s check out the settings, go to Settings > Custom Google Search.

Custom Google Search Settings

Paste the code that you previously copied from Google into the ‘Embed Code/Search ID field.

Select from the ‘Display search results as‘ options as follows:

  • Standard Page – results will be displayed in a search page using the standard page template.
  • Search Page – shows results in the theme’s search template.
  • Generated Page (risky) – will display a full width search with no sidebar.

Select a Style for the visual display of search elements. You’ll have the following options:

  • Default
  • Purple
  • Green
  • Coffee
  • Silver
  • Minimalist

Tick the ‘Open clicked search result in same window‘ option in order to have clicked links show in the same window, otherwise they will open in a new window.

Tick the ‘Hide search button‘ option so the search button won’t be seen, users can simply press the ENTER key to execute searches.

Tick the ‘Show sidebar on search page‘ in order to show a sidebar when using the Generated Page option above.

Specify your site’s protocol from the following:

  • HTTP
  • Protocol-relative URLs

Select a theme for the popup used by the widget from the following:

  • flick
  • smoothness
  • ui-darkness
  • ui-lightness
  • vader

Custom Google Search Widget

There will also be a new widget available at Appearance > Widgets:

Custom Google Search - Widget

For the ‘Display results’ option, you can select from the following:

  • in pop-up – displays results in a pop-up, using the theme specified in settings.
  • at bottom of widget – displays results within the widget.
  • on search page – takes user to search page where results are shown.

The Front-end Experience

Custom Google Search integrates with WordPress and replaces standard searches with Google search results. Results will be shown depending on your settings.

Here’s how it looks with relatively default settings, using the Default style:

Custom Google Search - Front-end Default

You’ll also be able to access searches directly, just as with regular WordPress searches, like so:

Simply replace the ‘wpmu’ with your own search term.

Need help?

We hope you enjoy using Google Custom Search and that it provides great search features for your site!

If you have any trouble at all with configuration, code or general usage, or if you have a cool feature suggestion to make, please head on over to the community forums where support staff and other helpful members are waiting to lend a hand.

Custom Google Search is covered by the WPMU DEV Guarantee

WPMU DEV Guarantee

We guarantee that...

  • Custom Google Search will work as advertised
  • You will receive 24/7 365 expert support for any problem
  • If you cancel your FREE trial, you can keep Custom Google Search
  • Custom Google Search is secure, always updated and well coded

Money back guarantee!

While you have 30 days, no obligations risk-free trial of WPMU DEV if you become a paid member and are dissatisfied with any of the above we'll refund you, no questions asked.

Powerful Features

Search with the awesome power of Google

  • Improve the WordPress built-in search functionality
  • Simple integration between Google Custom Search and WordPress
  • Custom styles makes search look gorgeous
  • Set custom search to search just your own site, or as many sites as you want (great for Multisite!)
  • Built-in widget adds search box to your sidebar
  • Display results on the search page, in a pop-up or in your sidebar
Custom Google Search in your language
  • Portuguese (Portugal)
  • Spanish (Spain)
  • Swedish
  • View all