Adsense in Blogger Post

Saturday, September 1, 2007
Posted by Ronin

Adsense inside blogger post is a tweek. You must edit your blooger template in order to add google adsense appear inside your post. At first i was thinking it as a difficult, but once i started editing and designing my own templates for blogger i can easily find out the solution.

Open Blogger account, Login to your account. Click on Layout if you are in Dashbord, or click Template if you are already inside. Go to Edit HTML option.

Remember whenever you are editing a blogger template try to have a back up. This you can easily do it by choosing Download full template. Once you have backed up your template, you can easily edit it now.
Find the code . First, you need to click on Expand widget check box on top right of the template editor screen. Then use page search to find the code. (ctrl + F)

div class="'post-header-line-1'/"
--->> Your google adsense code goes here.
......... ........ /div
Use <>
I have excluded for displaying purpose.

There is some alternation that has to be done before you can actually add an adsense code in your blogger post.Go to your adsense account, Click on adsense setup, and choose what kind of adsense you would like to display. Generally, Link text is good as you can display more ads in small place. Then choose continue, choose your adsense size, most of us use 200 * 200. This is optimal. Its your own wish, you can choose any size. Try to make the add blend with your template. Choose colours for your adsense title, Back ground. Then get the code.
Copy the code to a notepad. There is some alteration that you have to do.
find and replace :


< as lt;
> as gt;
" as quot;
Add '&' sybbol in front of it;

So now it must be displaying like this:

<script type="text/javascript"> <!--google_ad_client = "pub-4533457954699323";google_ad_width = 300; google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = " text_image";//2007-08-26: Moneygoogle_ad_channel = "2507803219"; google_color_border = "ffffff";google_color_bg = "ffffff";google_color_link = "3D81EE";google_color_text = "FFFFFF"; google_color_url = "99C9FF";google_ui_features = "rc:6";//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js;

Now its time to add to your blogger post after that line
div class="'post-header-line-1'/"
Add this after div class="'post-header-line-1'/"
Add :div style="'float:right;"
----> your adsense code
/div

You can display you add to right or to left.
add:div style="'float:right;"
----> your adsense code
/div

This one is used to display your ads to left of your post.
add:div style="'float:left;"
----> your adsense code
/div

If you want to display on top.
Add:div style="margin option"
----> your adsense code
/div

Just remove that float option. Save your template. If it shows some errors then you have made a mistake while editing your adsense code. Have fun.

0 comments: