WordPress Google Search Plugin
WordPress Google Search Plugin. Did you know that you could add Google search to your WordPress site without any plugin? Let’s see how to do this.
- Go to https://cse.google.com
- Create a custom search engine.
- Under sites to search, enter your website URL and click on create.
- Click on get code. The code looks similar to the code below. Copy the code.
<script async src="https://cse.google.com/cse.js?cx=003606982592251140240:gnfpjopgjnj"></script> <div class="gcse-search"></div>
- Go to appearenace-> widgets-> Click on custom HTML-> Drag and drop it to your sidebar and paste the code.This will add the Google custom search to your sidebar.
- You can also add the google search to the top of all your pages. To do this, go to your Appearence-> Editor-> open the header.php file and add your google custom search code to the file.
One of the main disadvantages of google custom search is that it contains ads.
Experterc’s wordpress search plugin is a good alternative.
Steps to install the plugin.
- Once you install the plugin from the above link.
- Go to https://cse.expertrec.com/?platform=cse
- Enter your website URL.
- Wait for crawl to complete.
- The plugin adds the search to the default search from in your wordpress site.
- If the search form is not present in your site, you could add the following code to your theme header.php file.
<?php get_search_form(); ?>
This adds a search engine that is more rich in features as compared to Google custom search.