Custom Google Search

Replace the default WordPress search engine with search powered by Google.

Version 1.2.2

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

Changelog

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;

Downloads 21,034

Compatibility WordPress 4.3 Multisite 4.3 BuddyPress 2.3.2.1

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.

Congratulations!

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
  • HTTPS
  • 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:

yoursite.com/?s=wpmu

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.

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