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.

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.

Leave a Reply

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

Free Newsletter


10 Best Soundbars for TV with WiFi and HDMI Connectivity.

The most modern TV soundbars come with WiFi and Bluetooth connectivity. For immersive audio experiences, it is necessary that sound really flows in the...

10 Best Golf GPS Watches in 2020

Getting the best gadget to aid yourself during the golf sessions can help you ease the games. If you've got the perfect golf clubs,...

15 Best Lightweight Browsers for Windows 10

As you know, heavy browsers can drain our system memory and precious battery life. What is the alternative? The answer is obvious, lightweight browsers....

How to Swap Values Between Cells, Rows or Columns in Google Sheets

Google Sheets is considered as an excellent alternative to Microsoft Excel for a number of reasons. First, you don't need to pay any fee...

How to Save Web Pages Offline to Read Later on Any Device

There is so much content being produced on a daily basis that it is getting increasingly difficult to keep track of what we read/watch...

12 Best Apple Watch Sleep Tracker Apps for 2020

There is no stock app for sleep tracking in the Apple watch. You have to depend on third-party apps if you want to track...