WordPress as a blog about running has it’s everything there. It has search functions, and it has various functions to stop spamming which is inbuilt inside of it. Still, many of us webmasters continue our endeavour to attach more and more plugins for adding extra features. Some days back I wrote an article about how not to be used any comment spam stopper plugins but still you can stop comments spam effortlessly. Now, I should let you understand about how to add Google custom search engine to WordPress. Google in its help file have detailed on it, but there is something which is missing out there and we could see and find out about this in this article.
Why is Google custom search for WordPress website?
While adding Google for custom search engine not only added you for the advanced benefits of good search engine optimisations techniques but also it does provide huge easier formats for correctly indexing your site. In addition to it, if you have Adsense approved account then you should include it in Google custom search engine so that you could earn extra while visitors search the queries inside of Google search engines. Default search functions of WordPress can be activated thorough widgets in its wordpress administration. Still, it is better to use Google custom search in order to provide relaxations to your database. Google provides search queries from its own cached servers and that should provide enough relaxations for your wordpress database. In addition to it is the seo factor of letting Google know about various links that website contains.
Google’s owned cached version of the database does not have the complicated relationships of the front end and back end database servers and it does provide huge amplification of running database easily and search comes with deeper integration of Google’s wit to provide really awesome search parameters. If you have earlier provides your site to Google Webmaster Tools then you do not have to worry about it and it does a search from what it has already been indexed and slowly every search parameters does come out with faster and accurate results.
How to add Google custom search to WordPress sites?
First turn off the built in search widget of WordPress from WordPress administration. Steps are as follows:
• Login to WordPress administration by putting administrator user name and password
• Now you reach for site’s dashboard. From its menu reach to appearances.
• From appearance menu reaches to submenu widgets.
• Remove the widget search from website.
• Now, you disable WordPress built-in search functionality which is a search for your site through SQL queries of WordPress database in hosting.
Creating a page that should be used as custom search result page of your website:
• Login to WordPress Administration, by putting a user name and password.
• Reach to the menu and then pages.
• Then click on add new.Name it search and se default template without any parent attribute. Publish that page by going to publish.
• Then reach to appearance menu than menus and then reach to menu structure.
• Here adds the newly created search page into primary menu structure.
• Then save menu from there.
• Run your website in a web browser to see how it is running.
Creating Google custom search engine for website:
• Reach to custom search dashboard of Google through this site: https://cse.google.ca/cse/all
• From its dashboard click on adds to add a new search engine.
• We should be doing comprehensive one site search so in the column sites to search and *.yourwebsite.com
• This means adding yourwebsite.com is the name of your website address without http or https protocol.
• If your website language is English then stay with it or change it from that column.
• Leave the name of the search engine and advance options.
• Then click on create to start with Google custom search engine.
• Google should say yo you as congratulations and you have successfully created your custom search engine.
Modify your custom search engine:
• After creating a custom search engine, you should find three elements such as add it to your site to receive the code.
• View it on the web for public URL
• Third which is important is to modify your search engine and click on the control panel to reach to control panel of google custom search which you have just enabled.
• On the dashboard, you should find five tabs such as basic, make money, admin, indexing and advanced.
• If you wish to monitors from Google custom search then click on make money and if you adsense an account in the same gmail then you should enable search engine monetisation on slide the button right to it to turn it on. Automatic Google ad sense account now was enabled with Google custom search engine.
• On the left side of the custom search dashboard, you have five tabs in a horizontal manner. It begins with setup, look and feel, search features, statistics and logs and business.
• In order to assimilate Google Analytics with custom search you should click on statistics and logs on the vertical tab set and then after reaching here you should find three horizontal tabs out there namely, stats, google Analytics and audit log.
• Click on Google Analytics horizontal tab within statistics and logs. From there chooses Google Analytics profile from select profile drops down list. If you have google analytics account with the same account and integrated with your website then choose the very same account here. Choose the query parameters and save knowing about visitors who are searching for an exact search parameters of the query you have assigned Google Analytics about.
• Then save.
How to get Google custom search engine code for your website:
• At the vertical column click on the second tab look and feel and after clicking you should have four horizontal columns namely layout, themes, customise and thumbnails.
• Click on layout horizontal tab of look and feel a vertical tab. Click on two page web search sub tabs of horizontal tab of layout.
• Scroll downwards and then click on save & get code.
• After this, you should be reaching to get code for a search box.
• You should find two codes. One is for code for a search box and the other one is for code for search results.
• First copy the code for the search box in the text file and then click on the obtain code for search results and copy that code and save it to the computer.
• At the top of get code for search box and its right side click on search results details.
• After clicking on search results details, the dialogue box namely specifies search results details. In the first columns put the search page which we have made in the beginning. Put the complete search URL of the page you have created earlier steps of above namely creating a page that should be used as custom search result page of your website.
• Sure to add prefix with appropriate protocol, such as http:// or https://
• Then click on saves for saving search page of your website.
Adding Google custom search engine code of get code for search box and the code for search results into the page you have created earlier steps of above namely creating a page that should be used as custom search result page of your website.
• Login to wordpress administration from a web. Put user names and password to reach into the dashboard.
• From its horizontal menu click on the pages and then all pages.
• Reach to page search which we have created in the segment; creating a page that should be used as custom search result page of your website.
• Click on edit and then reach to page editor of the search page. Click on text instead of visual editor and where we should put the Google custom codes which we have accumulated from; how to get Google custom search engine code for your website. First put code for the search box and then just after it the other one is for code for search results.
• Then click on update to update the search page.
• Open your website in a web browser. Click on its horizontal menu and then click on the search tab to open. It should open the same search page which we have just assigned the codes of Google custom search engine.
Now, search queries within a search engine. You should find the existence of ad sense ads in the beginning and closely followed by search results. If you have tried the search results out there, you should find that, more accurate search results and most of these results are very close to what the user is searching for. There are so many articles about putting css to this code, if you find the results from search results are being shown in some awkward manner then it is time for your add css into it. If search results are legible, then you should not be worried about it at all. In this way, you have created a comprehensive google custom search for public and visitors from your site to use this search for searching various articles of your website.