After my last blog post on “How to remove the default search box in WordPress blog”. I promised to write on “how to add Google Search for adsense in place of the default search box in WordPress blog”. So that will be the basis of this blog post. I will recommend you first read my earlier blog post on How to remove the default search box in WordPress blog because I will be skipping that step in this post.
How to replace the default search box with Google search for Adsense in WordPress:
So I will be going directly to how to add Google search for adsense after you must have removed the default search box in WordPress.
How to add Google custom search for adsense in WordPress: It won’t hurt to earn money from searches made on your website/blog by your visitors, so follow the following steps will guild you to achieving this.
Login to your adsense account and create a custom search engine by going to “My Ads” then click on “Search” and then custom search engine. Next click on new Custom Search button , fill in the options appropriately choosing the options that best suits your site. Adding custom channels will be best as this will help you track your performance anytime. Choose theme that will blend your blog’s theme.
The width of the search result page should be left at 800 because the search result is best displayed in that width. Then click on “save and get code” on completion of the form. Two codes will be generated – The search box code and the search result code.
Go back to the search page you created and edit it, paste the search box code and the search result code so as to display the search box and the search result. Hoping you have read my earlier blog post on “How to remove the default search box in WordPress, Go to ‘Appearance” on your WordPress Dashboard, then “Editor”, select the Sidebar.php in my case or the file that contains the position you want to display your search box. Paste the search box code on the appropriate position you want your search box to appear. Save it and view your blog on a browser.
If you like my blog posts don’t forget to Subscribe to NetMediaBlog Feeds by Email.