How To Add Adsense Inside Single Posts Only

The main defect with adsense widget is that we can only add a mximum of 3 widgets in a page and we cant add ads inside posts.Here is a way to add ads within your posts and also add will appear only after clicking read more.

1.Click on design --> Edit html in your blogger.

2.Check Expand widgets.

3.Find <data:post.body/>.

4.Immediately above it add your adsense code as shown below.

<div class='post-body entry-content'>
<b:if cond='data:blog.pageType == "item"'>
<div style='float: left;'>
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-xxxxxxxxxxxxxxxx&quot;;
google_ad_host = &quot;pub-xxxxxxxxxxxxxxxx&quot;;
google_ad_slot = &quot;xxxxxx&quot;;
google_ad_width = 336;
google_ad_height = 280;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
</b:if>
</div>

<data:post.body/>


important note:Do remember to replace '<' with '&lt;' and '>' with '&gt;' in you adsense code.


No comments:

Post a Comment