Disclaimer: MashTips is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission at no extra cost to you.

Home Blog How to Convert Wordpress Search as Google Search

How to Convert WordPress Search as Google Search

WordPress search is powerful enough to find out the post from your site. But if your WordPress site already indexed by Google search engine, it can bring out more relevant and related search results based on your search keyword. It is totally up to blog owners decision to use Google Search or WordPress Built in search function.

If you think to convert your built in search function to Google’s powerful search function, the please read this article to convert your WordPress search function to Google Search Function.

Converting your WordPress site search to Google search which finds content of your site is easy and simple. After doing this, your WordPress inbuilt search button will launch the Google Custom Search which is more comfortable than the original WordPress search. Following the given simple steps will make your WordPress site search form into the Google Custom Search.


google search on wordpress

As the first step, we need to find out the “searchform.php” file from your website files. Normally it will be under the main theme folder. Locate that file and open it with Editor.

google search


Before attempting to change any thing, do remember to take the back up of the site and “searchform.php” file. To take backup of the “searchform.php” file, you just need to copy and paste the contents into any notepad file.google search


Now we need to open your custom Google search code. If you find any difficulty to find the one, you may copy and paste the below given code to any notepad text file. After that you need to change the Google id in that notepad file. After changing the Google id, you need to save the file.

<form id="searchform" action="http://www.google.com" method="get"><input type="hidden" name="cx" value="partner-pub-2044542687082877:2393269179" /> <input type="hidden" name="ie" value="UTF-8" /> <input id="s" type="text" name="q" placeholder="<?php _e('Search', 'themify'); ?>" />

Themify is the theme that we used in this example. You may see a different term in this place based on your theme.

google search


Now we can delete the contents of the “searchform.php” file after taking the proper backup. The main step is to copy the custom Google search file you just prepared is to be copied into the “searchform.php“. After copying it, update the file and the changes will be updated.

google search

You may need to enable the search button from your theme settings to view the affected changes. Once completed successfully, typing any query in the search button will open the Google custom search window and the search result will follow. You can revert the changes at anytime by restoring the contents of the “searchform.php” from the backup file created.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Holiday Gift Ideas 2020

15 Best Drones for Kids and Beginners to Buy in 2020

RC Drones have become very common nowadays. Lots of kids are developing an interest in it as a toy due to its distinctive features....

12 Best Xbox Gift Ideas for Xbox Fans in 2020

Each and every person who heard about the new generation Xbox consoles will love to have one. Who doesn't want his hands on the...

20 Cool Gadgets Gifts for Men in 2020

Holidays are nearly upon us and considering the year we've had so far, people perhaps would cherish this opportunity to celebrate and forget about...

12 Best PlayStation Gift Ideas for PlayStation 5 Fans in 2020

Who wouldn't love gifts, especially when it is a gaming console? For all those who plan to surprise their beloved ones with the latest...

Free Newsletter

Related Articles

How to Directly Import iCloud Contacts to Google?

Apple ecosystem is pretty isolated and not easy to transfer data to Android or any other platform. If you are an iPhone owner and...

How to Connect and Control Light Bulbs with Google Home

Google Home, being a smart speaker, offers a wide variety of automation and touchless control to tons of WiFi-enabled devices. You can control everything...

A Simple Solution to Sync Google Calendar in Windows 8

You can synchronize your Google Calendar to the Windows Calendar App in the Windows 8 or 8.1 using Google Calendar App. This synchronization takes...

Search Google by SMS from your phone.

This free service from Google is good for those who are still using the ordinary phone with out internet connection. A smart phone user...