Display AdSense Only In Blogger Posts

Posted by Motti 12 February, 2008


blogger_adsenseBlogger does not allow to be creative in about AdSense location on your blog. You can use the default blogger AdSense panel to edit your ads location.

But as you finally understand for by yourself you can not distinguish on what pages you can put your ads, if you choose to put ads on a specific location on your page, they will appear on every page of your blog.

 There is a way to bypass  this limitation by adding an IF condition into the template code.

This way you can choose in what place you AdSense ads will appear.

Just add this code in you template and see the magic:

<b:if cond=’data:blog.pageType == "item"’>

    Your Google AdSense code here

</b:if>
 

This trick worked for me on many blogs but on one it’s to refuse to work, give me you opinion if you tried it.

If you liked this post, you will probably love these too:

Categories : AdSense For Blogger Tags : , , ,

Comments

No comments yet.


Leave a comment

(required)

(required)