Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/template-parts/boxes/breadcrumbs.php on line 26

Build a Custom Search Engine for WordPress Websites Like Google


Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/inc/admin-ad.php on line 49

Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/inc/admin-ad.php on line 283

Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/inc/admin-ad.php on line 328

If you are reading this article that means, either you own a self-hosted website or you are the main backend developer of a website powered by WordPress. In both cases, what you do, you do it pretty seriously. Lets get to the point, on this article I will try to portray a detailed process on ‘how to build your own search engine like Google for WordPress websites’. Now, the first question is why you need this, when you have a default search box inbuilt within your theme.

Believe me, there are strong reasons. If you think that you know those reasons, just skip this para to the next one. Adversely, if you are in the dark then I will detail you. WordPress, for the time being, is unparalleled as a blogging platform or CMS service. Like every perfect services it also carries some imperfections with it. It’s built-in site search features are not that smart like other search engines. Where, professional search engines like Google or Yahoo dig up every possible keyword specific search results, it barely scratches the surface.

You need to discover a better solution to that and google is offering the same without asking for your single buck. Now, if you build and add your custom search engine to your WordPress website, many things will fall in their places as they should be. Firstly, it will fetch every possible search results from your website for your viewers within a blade of time. Secondly, you can customize the look and the search features of that custom search engine for a better blending of it with your site’s theme. Thirdly, you can earn some extra bucks from this custom search engine using ‘Adsense for search‘, a brilliant earning scheme from Google for your blog.

I hope, these answers have justified your question. If not, you can always get Google to answer your questions.

It’s a few clicks away

before starting, I will assume that you have an administrator access to a WordPress self-hosted website and have a ‘Google Webmaster Tools’ account linked with that WordPress website. Simply, search the term ‘Google Webmaster Tools’ and sign in with your Gmail log-in values. There, under ‘Other Resources’, you will find ‘Custom Search’.

 

 

 

Otherwise, you can directly go to Google Custom Search Engine creation page and start building one. Have a left click on the ”Custom Search link’ to launch the same. Now, on the first page you will be asked to add your website’s url for which you are building the custom search engine. Key in the right address there on the required box. You can add your entire site, part of it, an individual page or the entire domain.

I will strongly recommend you to go for adding your entire site only. Nothing else first as you want the custom search engine to cover your entire site and fetch result from the same on any search term.

 

 

Consequently, your first step will successfully build your own search engine like google. You will have the unique ID, Public URL and the most importantly, the code of your newly built search engine. You will also get the look of the search box along with the adjacent search button on the right view pen. Moreover, you can also enable the ‘Image search’ and ‘Speech input’ from there.

 

 

Test the first blood

Now, you can copy that public URL and paste it on any browser’s address bar to check, whether it’s fetching results from your site only upon searching any expected search term. I will recommend you to start searching with those keyword, you work with or you mainly blog about on your site. Added to this, you can also try to search any specific name of your team members or writers. it will certainly fetch all the possible results linked to that keyword or the name. The screenshot under shows my website’s custom search engine’s results.

 

 Make it yours

Ok. you just have crossed the first bridge to build your own search engine like google for your WordPress powered website. Now, it’s ready to roar on your site but its look isn’t that homogeneous with your site’s theme. Thankfully, you can paint it to make it look like a part of your theme. Just hover to the ‘Look and Feel’ section, where you can customize the main layout, Theme, add your logo and more.

 

 Get the code and add it to your WordPress site

Finally, when you think you have done with the customization process, hit ‘Save and Get Code’ button. Now copy the cove and save it as a text file on any text formatting application, first. Then, sign in to your WordPress Admin panel and paste the code to any right location you want.

 

Personally, adding the code to your WordPress site can be a tricky one. Before executing any alterations to your site’s theme files, I will strongly recommend you to take a backup of everything and dump it on any secure location on your hard drive or Cloud drive.

Depending on your chosen layout, the custom search engine will execute. Google always recommends us to use either the ‘two-page’ or the ‘two-column’ layout for a hassle free execution of fetching and rendering search results. You can always go through the documentation you need for adding the custom search engine to your site or knock then to help you.

I have used the ‘Hosted by google’ layout for mine and added the code as a ‘text-widget’ on my site. I hope, your WordPress theme supports these same features. If not, I know you will find a way as a coder’s love always outweighs any challenge. Share your story with us on this topic or let me know on this channel, if I can help you out.

Like this post? Please share to your friends:

Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/inc/admin-ad.php on line 379

Warning: Trying to access array offset on value of type bool in /var/www/pbn/data/www/thepimanifesto.com/wp-content/themes/root/inc/admin-ad.php on line 408
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: