Thursday, August 13, 2009

How insert adsense in blogger and wordpress post

I just want to share it...I have some question from my friends about the adsense advertisement that apear in my blog post like "this".
If you using blogger/blogspot, that's very simple , just login to blogger dashboard - layout - look at "blog post" section - click Edit - will appear "Configure blog post" window,then select and tick "Show Ads Between Posts", then you can configure and set ads format also how often the adsense advertisement will appear in every post.
Done..!
With manual method the adsense code also may placed after or before <p><data:post.body/></p> code within "Edit HTML" section, you may leave comments here if you have questions about it.

adsense post in blogger
In Wordpress
1- Open Stylesheet (style.css) file place the code below anywhere after the "body" tag.

.adsense-right { float:right; padding:5px;}

At float (position) change according to your wish ,right or left
Then "save" or click on "update file"

2- Open Single Post (single.php) file , place the code below before <?php the_content code:
<div class="adsense-right">
</div>

3- Place the adsense code betwen <div class="adsense-right"> and </div> , for example look below :

<div class="adsense-right">
<script type="text/javascript"><!--
google_ad_client = "pub-6707264940417566";
/* 120x600, created 8/8/09 */
google_ad_slot = "1056276584";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>

In my blogspot templates, each templates was designed to be adsense ready configuration , also if you interest please check out here an adsense ready wordpress themes

1 comment:

  1. I appreciate the labor you have put in developing this blog. Nice and informative.

    ReplyDelete

Please leave your comments or your promotion links, but don't add HTML links into the comment body, because I consider it as a spam, and will be delete..

Thank you for your visit..