Custom Google Search Results Page on Your WordPress with Adsense Deluxe

I was looking at LiewCF’s extensive documentation on how to create a custom Google search results page within your WordPress blog, and I decided it was just too techy for me.

So I devised a simpler approach – using Widgets and the Adsense Deluxe plugin. This is an approach that most of us regular folks will be able to accomplish easily, assuming you already have these components:

  • A Google Adsense account and a WordPress blog :)
  • WordPress widgets and a widget-compatible theme
  • The Adsense Deluxe plugin installed and activated

This interesting exercise will produce your own custom Google search results page with your Adsense ads on them, and the best part is that it will appear as part of your overall theme.

Step1: Create Your Search Results Code in Google Adsense

Login to your Adsense account and create a new “Adsense for Search” block. Choose “Google Web Search + Site Search” and

Recommend that you lose the Google image and opt for the Google name in the search button instead. Put the search button beneath the search field like the picture below.

googlesearch-05.jpg

For search results options, choose “Open results within my own site”. For the URL, you can put something like this:

www.yourdomain.com/directory/search-results/

Replace “directory” with the folder you’ve installed WordPress in. If you have WordPress installed on the main domain (root) just enter something like this:

www.yourdomain.com/search-results/

This is because you will later create a WordPress page called “Search Results”.

Step 2: Create Your Search Box Using Text Widgets

Now if you already have Widgets installed and you’re using a Widget-enabled theme, all you need to do is copy the search codes and put them into a text widget, which you can place right at the top of your sidebar.

googlesearch-02.jpg

Once you’ve generated this text widget, it may look something like this (depending on your theme):

googlesearch-03.jpg

Now you have your search form up, so you can start to create your custom results page.

Step 3: Create A New Adsense Deluxe Block

Now, the funny thing with WordPress is that be default, you cannot insert Javascript or PHP codes into posts, unless you have some kind of plugin that enables it.

The Adsense Deluxe plugin not only enables you to add Adsense codes into your posts and pages; it can also be used to hold and insert Javascript. Therefore, it can also be used to hold your customs search page code.

Voila!

googlesearch-01.jpg

Go to Options > Adsense Deluxe and create a new block. You can call is “googlesearch” and insert the codes into the settings.

Now you’ll have a custom code that you can use in your page.

Step 4: Create A New Page for Search Results

Go to Write > Pages and create a new page, naming it Search Results. Within the page, insert your new Adsense Deluxe code that will generate the custom search results page. Your code, depending on what you named it, may look something like this:

< !– adsense#googlesearch –>

You can also add stuff to the beginner or the end of the page, for example some text, banners or other elements. Save the page.

Step 5: Test Your New Custom Search Page

Now you can test your custom Google search results page. Mine looked something like this:

googlesearch-04.jpg

So there you have it: a simple, easy way to add Google custom search results to you page. Watch your Adsense income soar, all while maintaining your site navigation and layout.

Remember though that the Google search tool will only return results from your site that are already indexed in Google, so it may not be suitable for new sites.

Enjoy, and if you want to mater WordPress I recommend you take a look at the WordPress Adsense System and our list of tools and plugins.