When it comes to search, WordPress drastically lacked the space although there are plugins available out there which may helps the one to improve search results. But for those who don’t want to add additional plugin for the purpose as well as increase the functionality, there is one such big option available out there. One can consider on replacing their by default WordPress search with Google custom search.

Google Search

Suggested Reading: Five Best Search Plugins For WordPress

Creating a Google Custom Search Engine

  1. Go to Google Custom Search Engine and sign in using a Google account.
  2. Once in, then click on New Search Engine and add your WordPress website’s URL.
  3. Click on Create button to proceed to the next step.
  4. Once done, you will notice a notification which says you have successfully created your custom search engine.
  5. An option then will comes in front of you either to add it to your site or get the public URL.
  6. To add this to your WordPress site, click on the Get Code button.

Adding In Your WordPress Blog

  1. Go to Appearance » Editor in your WordPress admin area and click on searchform.php file.
  2. The searchform.php file will open it in the editor.
  3. Paste the custom search engine code in the file.
  4. If your theme does not have a searchform.php file, then you need to create one using a text editor like Notepad.
  5. Once created, upload it to your theme directory using FTP client.
  6. Once code is pasted at its right place, go to Appearance » Widgets to drag and drop the search widget into your sidebar.

Photo Credit: Flickr/karlnorling