Monday, May 21, 2007

Wrap Adsense In Beta Blogger Post

There are at least two Adsense-aware widgets in Beta Blogger template to embed Google Adsense code, one is called HTML/Javascripts widget and the new added widget called Adsense.

Widgets are the easiest way for novice bloggers to deploy Google Adsense code in Beta Blogger template. Just follow the simple instructions to create a page element using the widget, then drag it to position where the Google Adsense is expected to appear. It could be in sidebar, footer, header, on top or bottom of post body.

But, is that possible to wrap the Google Adsense inside Beta Blogger post body? Yes, by dealing with Beta Blogger template HTML coding, with these simple steps:

  • Click on the Template tab to open up Beta Blogger template page.

  • Click on Edit HTML link to open up Beta Blogger template HTML coding page.

  • Tick the Expand Widget Templates checkbox.

  • (This is not necessary, but is recommended.) Before making any changes, click on the Download Full Template link, to save a backup copy of Beta Blogger template HTML code.

  • Search for the line <data:post.body/> in Beta Blogger template HTML coding

    <div class='post-body' expr:id='"post-" +'>
    <b:if cond='data:blog.pageType == "item"'>

    The block of strike-through code is not found in original New Blogger templates. I've made note of this in comment below (in red block of text). But, I found that not many readers are patient to read comments. So, I decide to make an update in the post. You'll also find this update on how to legally change Adsense code to add in New Blogger template, as well as some ideas of advanced Adsense placement inside a post body.

  • Insert this block of HTML code before the <data:post.body/> line of HTML code

    <div style="float: right;">Paste the Google Adsense code here</div>

  • Save the changes made.

  • Done!

Related information:

No comments: