Do you want to use Google search on your WordPress site? Although WordPress comes with a built-in search feature, it is not very good. That’s why many site owners add Google site search on their WordPress site. In this article, we will show you how to easily add Google Search in a WordPress site.
Why You Should Use Google Search in WordPress?
The default WordPress search feature is not very useful. It often fails to find the relevant results. This forces site owners to look for alternatives.
On the other hand, you can use Google’s reliable and powerful search feature instead. It is free, allows you to limit the search to your sites only, and can be run from your own site.
Other benefits of using Google search are speed, users already trust Google brand, and you will not have to maintain or update it.
Having said that, let’s see how you can easily add Google site search to your WordPress site.
Adding Google Search in WordPress with Plugin
This first method is easier and recommended for beginners. It allows you to add Google search to your WordPress site without modifying your theme files.
First thing you need to do is install and activate the WP Google Search plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you need to visit Settings » WP Google Search to setup the plugin.
The plugin will ask you to provide a Google Search Engine id. Here is how you will get a search engine ID.
Visit Google Custom Search website and click on New Search Engine link on the left.
Simply provide your WordPress site’s URL in ‘Sites to Search’ field. Next, you need to choose the language of your website. Lastly, click on the create button to continue.
Google will now create your custom search engine and will show you a success message with links to further actions. You need to click on the control panel button to continue editing your search engine.
This will take you to the control panel for your custom search engine. First, you need to click on the ‘Search engine ID’ button and copy your search engine ID.
Next, you need to click on the ‘Look and Feel’ section. Under the layout tab, select results only.
Once you are done, click on the save button at the bottom of the page to store your changes.
Now you can switch back to your WordPress site. Paste the search engine ID you copied earlier in the WP Google Search’s settings page and then click on the save changes button to store plugin settings.
After that you need to visit Appearance » Widgets page. There you will notice WP Google Search widget in the list of available widgets. Drag and drop the widget to a sidebar where you want to display the search form.
Click on the save button to store your widget settings.
You can now visit your website to see the search form in action.
We hope this article helped you learn how to add Google search in a WordPress site. If you enjoy it, feel free to share or leave a comment below!