How to replace the Blogger built-in inlineAd adcode with your custom code

Blogger generated inline ad below the comment section
Blogger generated inline ad below the comment section

The inline ad ("inlineAd" in the template code) placement that is built in into the Blogger template or theme is actually quite useful. It provides the automated way to place it right after the comment section and also between the posts items when the page type is an index type. You can even define how many posts to appear before the ad appear in the Blog widget. What I don't like is that I cannot reuse some of my Adsense ad units. Blogger will always create a new unit for me. If you are like me that would like to replace the auto generated ad unit with the ad unit of your own, this is how you can do it easily.


Step 1: Go to the Blogger theme or template editor.


Step 2: Search for this line of code. Note that there are two places that have this line of code. You will need to replace both of them.

<b:include data='post' name='super.inlineAd'/>

Step 3: Comment out this line of code. The texts highlighted in yellow below are the comment syntax.

<!--b:include data='post' name='super.inlineAd'/-->

Step 4: Copy and paste your custom Adsense adcode right after the commented line of code.


Comments

Popular posts from this blog