How to Embed Adsense add unit in Left or Right corner of post content

Posted by Lasantha Bandara File Under : adsense, change template, html, post, seo 3 Comments

This will explain How to Embed Adsense add unit in Left or Right corner of post content

Generate Parsed code for adsense code because we cannot put adsense code directly in the xml.So parse it using AdParser.

After parsing,your ad code Should look like this.

1.Log in to your dashboard--> layout- -> Edit HTML

2.Click on "Expand Widget Templates"

3.Scroll down to where you see this:-

<div class='post-header-line-1'/>

4.To place ad Top left corner of your post ,Paste the below code, below of above line.

<div style=”display:block;float:left;margin: 0px 10px 0px 0px;”>
Your Adsense Parsed code
</div>

Attention :  We can't put "<div style=”display:block;float:left;margin: 0px 10px 0px 0px;”>" and "</div>" directly in the xml.So we must generate Parsed code for these code using AdParser. 

So Final Code you have to copy below the line "<div class='post-header-line-1'/>" ,look like this.

 

If you Want To place ad Top Right corner of your post,Replace "left" with "right".

5.Click on "Save Templates" and Refresh your site.

3 thoughts on “How to Embed Adsense add unit in Left or Right corner of post content

  1. Can i add this trick just in special posts? If I add the code mannualy on the posts I want, it will look like an intruder there, the ad will be surrounded by the letters. Is there a trick for?

  2. Hello Lasantha.,
    if i use div class='post-header-line-1'/ code and after putting the ad code .,on the home page ads comes in all posts anr leaving sidebar ads empty.,but i want to show the ads between the posts just like you implemented in your own site.
    plz help me and give the solution
    mehta.mnc@gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.