Walker News

A capsule of walker’s experience in life…

How To Display Adsense Search Result Within Wordpress Page



Google Adsense Search not only brings in dollar and cent but is also one of the effective way to look for related articles within the site and the world wide web.

Initially, the Adsense Search result can only be shown on a new pop up window or on the same window with Google.com domain.

Then, there is third option which allows Adsense publisher to display search result within the real same page, i.e. on the same domain and same window! (But, this feature is only applicable to publisher who can create a dedicated search result page for the site.)

How to display Adsense Search Result within Wordpress page?

  1. Generate Adsense For Search code in your account - in the More Options section, select “Open results within my own site”.
     
  2. Create a new page for your Wordpress powered site - login to Wordpress, click the Write tab follow by Write Page and define the Page Slug as “search”
     
  3. Edit the page.php (Wordpress theme template file) and embed the following PHP snippet right after the_content function call. The is_page function ensure the Adsense Search results will only be shown on a page that called “search”! Enclose the Adsense Seach Result code in the echo statement.
    <?php
       if (is_page('Search')){
          echo "<!-- Google Search Result Snippet Begins -->....";
       };
    ?>
  4. Embed the Adsense Search code into the sidebar (sidebar.php) / bottom of post (single.php) where you want it to appear.

The Adsense Search might appear differently or look weird in some Wordpress theme. In this case, you might need to change the CSS style of few HTML tags which are used in Adsense Search code, such FORM, TABLE, LABEL, INPUT, etc.

As you couldn’t change the original Adsense code, so the easier way will be assign different CSS class / ID to those HTML tag that construct the overall Wordpress theme.

Bookmark and Share:
  • Facebook
  • StumbleUpon
  • Sphinn
  • Digg
  • Pownce
  • del.icio.us
  • Live
  • Google
  • YahooMyWeb
  • Slashdot
  • Furl
  • NewsVine
  • Reddit
  • Ma.gnolia
  • TailRank
  • Technorati
  • BlinkList
  • blogmarks
  • IndianPad
  • Haohao
Topic - Internet   Search - , , , , , , ,

Similar Articles:
» Highlight Author Comment And Pingback In Wordpress Theme
» Display Adsense Ads Between Posts In Wordpress
» Enable Gravatar In Wordpress Comment And Pingback
» Update WP_TITLE To Display Blog Name On The Right
» How To Insert Multiple Images In WordPress 2.6 Without Using Shortcode?
» Adsense: Keep The 1-2-3-3 Limitation In Mind
» Adsense Referral Ads Unit Ceases By The End Of August 2008

Custom Search
Make your PC more useful by downloading the FREE Google Pack!

Latest Posts @ WalkerNews.net

↑ Grab this Headline Animator

Navigation:
» HOME - WalkerNews.net
« PREV  - Direct Download Windows Vista Update KB941649
» NEXT  - Download Raiden PC Game For Windows Vista

No comments yet. Be the first.

Appreciate your comments, but please be in topic.
Please use proper English with punctuation, from 12th of May 2008 onwards.
WalkerNews.net supports Gravatar (Web ID)