Website-with-Google-Search-Console

How Can You Add Google Search to A WordPress Website

Table of Contents

Whatever type of content you have on your website, you want to make navigation as simple as possible for your users. It's difficult enough to get people to visit your website in the first place, so making them happy and keeping them coming back for more is the next step, and simple navigation to the content they want goes a long way toward enhancing user experience. You could add a search bar to your WordPress menu, or allow your visitors to filter your content by category or tag, but there's another way to make it easier for them to find what they're looking for: Google search. Let's see how we can do that in this tutorial.

But, since WordPress has its own search engine, do I still need to use Google? I understand your question. Before I get into the nitty gritty of the how-to, I'd like to discuss the why.

What's the Point of Having Google Search on My WordPress Site?

It's simple to answer: using Google's power has advantages, and using WordPress's default search feature has disadvantages.

The default WordPress themes have a search feature that works, but it's pretty simple. That's all it does: it returns results based on keywords. You need to look elsewhere if you want a more flexible search feature.

Using a custom search bar, whether as part of a theme or as a plugin, is always more effective and gives you more choices. Plugins and themes, on the other hand, require keeping up with WordPress updates. For better or worse, Google does not. Additionally, any search that uses your server's resources (such as a search using a theme's search function or a search plugin) can trigger slow performance – in other words, if your server is dealing with more traffic than it can handle, you won't get a great user experience.

Google, on the other hand, is fast, and you can restrict Google's searches to your own website or websites using the Google search feature. Furthermore, Google searches are free for the end user, as is setting them up on your . Finally, the world's most common search engine helps the users to customise their searches by using Google operators.

Simply put, Google's search feature is quicker and more flexible than WordPress's, and it also incorporates the Google brand, advertising to your visitors the brand's reliability and speed, which have helped to make Google the search engine powerhouse it is today.

Let's get down to brass tacks now, with that in mind. You can add Google search to your WordPress website in two ways: with a plugin or by editing your theme files. In either case, you'll need to use Google's Programmable Search Engine service to create a custom search engine.

How to Make a Google Search Engine That Isn't Google

The first step is to sign up for Google's Programmable Search Engine website. This service will enable you to build and customise a custom, Google-powered, automatically updated search engine, which we will demonstrate how to integrate into your website.

Select Get Started once you've arrived at the website.

GOOGLE PROGRAMMABLE SEARCH

You'll be guided to a screen where you can set up your new search engine.

The Sites to search fields are the most critical settings. You can use your search engine to look for a single website, multiple websites, individual pages, portions of a website, or entire domains, as we have done.

You must also choose a language (the default is English) and a name for your search engine.

After you've completed all of these steps, you're ready to CREATE your own search engine.

CREATE GOOGLE SEARCH
Create Google Search

You'll be taken to a screen with buttons to add it to your site, view it on the web, and Modify your search engine.

CREATED-PROGRAMMABLE-SEARCH

The next step is determined by the tool you choose to use to integrate Google search into your website. Keep this tab open in either case. It will come in handy later.

Using a Plugin, Add Google Search to Your WordPress Website

You must first instal the plugin before you can use it to add the custom search you made. WP Google Search will be included. You'll need to customise it to use your custom search engine after you've enabled it. Pick Settings>WP Google Search from your WordPress dashboard to access the plugin configuration page.

WP-GOOGLE-SEARCH-PLUGIN

In the top area, you'll need to enter your Google Search Engine ID. Go to your programmable search engine page and press the Control Panel button to find out what it is.

CREATED-PROGRAMMABLE-SEARCH

The Google Search engine ID can be found in the Basics tab of the search engine's control panel. Click the Copy to Clipboard button to copy this ID code.

GOOGLE-SEARCH-ENGINE-ID

Going back to your plugin configuration screen, paste the ID in the Google Search Engine ID field and click Save Changes.

PASTE GOOGLE SEARCH ENGINE ID
PASTE GOOGLE SEARCH ENGINE ID2

You must now connect this custom search engine's widget to a widget area in order to integrate it into your plugin. To do so, go to your WordPress dashboard and go to Appearance>Widgets

SEARCH APPEARANCE WIDGETS 2

Then, in the left-hand section of the phone, look for the WP Google Search widget. We've decided to put our Search in the bottom right corner of our header. It's worth noting that the availability of widget areas, as well as their behaviour, is determined by the theme you're using.

You can drag and drop the widget from the left-hand side of the screen to a widget area on the right, or you can do what we did and choose a widget area from the widget's drop-down menu and press Add Widget.

ADD WIDGET SEARCH

And your widget will appear in the widget region you added in your theme.

Using Code, Add Google Search to Your WordPress Website

You can also take a different approach by changing your code. On your Programmable Search Engine screen, look for the Get code button and press it.

GET CODE SEARCH ENGINE

In order to incorporate your custom search engine into your website, you'll need to copy this code.

COPY CODE SEARCH GOOGLE

Then paste this code into the searchform.php file of your theme. Navigate to Appearance>Theme Editor to use it.

THEME EDITOR WORDPRESS

Replace all of the code in searchform.php with the code you copied from your Programmable Search Engine from the right-hand side menu. Back up your searchform.php file if you want to be extra cautious. In reality, back it up even if you just want to be safe. Click Update File after you've replaced your code.

SEARCHFORMPHP WORDPRESS

A search widget also needs to be added to your website. Add the Search widget to your favourite widget field by going to Appearance>Widgets. We'll put it in the bottom right corner of our header.

ADD WIDGET SEARCH

Your Google-powered search form will then appear in the location you specified.

Your visitors can now search for something and only get results from your website, or whatever corner of the internet you've set your search engine to look into.

Final Thoughts

Setting up Google search on your website is simple and free, as we've shown, whether you do it by editing your theme's code or installing a plugin. You can't go wrong in either case; just make sure to back up everything if you're going to update your code. If you're unhappy with WordPress's search method, can't find a plugin that works for you, or simply want to give your users a better way to access your content, Google may be the way to go.

Share This Article:
Facebook
Twitter
LinkedIn
Pinterest
WhatsApp
Email
Reddit
Related Articles:
image size reduce online
Facebook
Free Image Size Reduction Trick

Without Any Plugin Did you know that a normal website gets most of its weight from the images used in it? It is true. The majority of website size is mostly because of the images used in its pages. Optimizing images without losing quality is a difficult task for average

Read More »
free wordpress hosting
Plugins
Host Your WordPress Website For Free Forever

Hosting a WordPress website can be an expensive thing if not done properly. It can go from just a few dollars to thousands of dollars a month. Finding WordPress hosting can be a difficult task. If you own a small blog or website that you do not update often then

Read More »
free high quality backlinks
Backlinks
Get Free High Quality Backlinks The Creative Way

A backlink in the SEO world is a link from a post or a page on one website to another. If a website is linking to your content, it means you got a backlink. These backlinks are also called “inbound links”. Sometimes they are also called “incoming links”. Carrying a

Read More »
seo programming
Search Engine Optimization (SEO)
Learn SEO Programming And Digital Marketing Coding

Search Engine Optimization programming is not a coding language. It is a collection of codes and programs that are usually used by SEO experts to perform Technical SEO on the website. You do not have to learn a programming language to become an SEO expert. SEO is independent of any

Read More »
Chat With Our SEO community members On discord
Discord SEO Community Chat
  • z. avatar z. trying it out right now
  • nkap avatar nkap Great idea! Will definitely try it out. Thanks mate.
  • ddev66 avatar ddev66 A good trick to get guest posts for your website. <@968643757010481232> <@755307075625549854>
  • Büşra avatar Büşra Thank you very much. I'll try 😊
  • nkap avatar nkap Yeah me too!!
  • naaz avatar naaz <@755307075625549854> Thank you for the detailed answer. Hope <@341197404302737408> finds the right solution for this.
  • nkap avatar nkap <@341197404302737408> Just these:

    You can try 3 things: (I suggest you try the 3rd option first)

    1. If there are any links in your coverage report that’s actually not from your domain/property, I’d recommend you use the Search Console’s removal tool to remove these from your property.

    2. If you’re using any page builders like elementor etc make sure you turn off search engine indexing for things like templates. You can find this in Yoast SEO settings. With this setting your templates and unnecessary pages won’t be indexed. Are you using elementor by any chance?

    3. It’s also possible that your site has been hacked. If random URLs are appearing in analytics and search console the first thing that you should do is check your .htaccess file to see if someone has put any rewrite rules.
  • ddev66 avatar ddev66 <@755307075625549854> got any views on this?
  • ddev66 avatar ddev66 did you change your permalinks sometime back in last few months?
  • naaz avatar naaz <@838326478924021760> bringing to your attention on this.
  • Büşra avatar Büşra hello guys! I need to help about SEO optimation. I'm using wordpress Yoast. I saw dummy link like as ``` https://myURL.com/cuisine/35/17498``` I haven't these in page. Btw ı'm using google search console. Why may be this? Is anyone has idea about that?
  • ankit662003 avatar ankit662003 does anyone know how to create seo silos?
  • ankit662003 avatar ankit662003 hi
  • ddev66 avatar ddev66 Just know that we are all here to help each other
  • ddev66 avatar ddev66 No worries mate.
  • Alex25 avatar Alex25 The thing is idk what to ask .
    I'm just stuck
  • ddev66 avatar ddev66 Drop your queries here
  • ddev66 avatar ddev66 Surely <@555915490791391232>
  • Alex25 avatar Alex25 Hello guys ,
    I'm a begginer at Marketing and i'm really stuck on my project if you guys can help me with it i'll be soo greatful .
  • ddev66 avatar ddev66 Discuss your seo related questions here
  • Alex25 avatar Alex25 Hello everyone
  • ddev66 avatar ddev66 Hello everyone! Here we will be sharing all the SEO related information and threads.

Leave a Reply

Your email address will not be published.

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