• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

WP SITES

2467

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Subscribe
  • Register
  • Videos
  • Log in

Need Help? - Get Coding Support Now

How To Create & Add a Google Custom Search Box To WordPress Which Works

Google custom search is so accurate i use it every day on my own sites. Why? Because the default WordPress search isn’t much help and normally returns irrelevant results.

There’s also quite a few advanced search plugins which will give your readers a better chance of finding what they need however nothing beats Google when it comes to search,  so why not create a custom search engine for your own site?

Here’s a few reasons you might want to:

  1. Include one or more websites, or specific web pages
  2. Host the search box and results on your own website
  3. Customize the look and feel of the results to match your site

First up you’ll need to create a custom search engine.

There’s 3 very easy steps to creating a custom search engine with Google:

  1. Setup Your Search Engine
  2. Choose or Customize a Style
  3. Get The Code

Simply enter a name and description along with the site URL your want the search engine to access for results.

Setup Your Search Engine

Setup Your Search Engine

Next step is to Choose or Customize a Style. Its here you can customize the look and feel of your search  controls and results page.

Choose or Customize a Style

Choose or Customize a Style

Third step is to Get the code. I simply copied and pasted this code into a standard text widget for HTML. This is because my theme allows this to work. If yours doesn’t try a php widget otherwise you’ll need to add the code to your templates using a WordPress hook.

Get The Code

Custom Search Element Code

That’s it. You should be very happy with the results you get from using the Google custom search engine.

I use it myself every day because its more accurate than any other search engine and it always produces accurate results which are relevant especially if you’ve included a good amount of relevant keyword and key phrases in your content.

If you do go ahead and create a custom search box i would like to know if you are happy with the results.

Other Ways To Add A Google Custom Search Box

  • Add Google Custom Search To Genesis Nav Menu
  • Add Google Custom Search In Nav Menu Of Any Theme
Subscribe for new Genesis Tutorials

Primary Sidebar

Recently Coded

  • Infinity Pro Vertical Menu
  • Genesis Sample Theme – Custom Archive Page Template With Different Hero Images
  • Foodie Pro – Reposition Search Box Before Nav Menu
  • Showcase Pro – Use Custom Image As Single Post Entry Header Background
  • Blog Page Template Showing Entry Title, Featured Image & Excerpt In Columns

Brad Dalton Specializes In Genesis child theme customization & code modification.

Advertise · WPEngine · Genesis · Log in

  • Membership
  • by Theme
  • Contact
  • RSS
  • Newsletter ( Twice Weekly )