How to show ads inside blog posts

Image result for download adsense pics

Someone asked me about this on my facebook and I helped him solve it. So I decided to share it here because I know its a general problem. This tutorial is mainly to show adsense ads between your post
title and body of the post, but it works for other ads as well. Now let's Begin!

Login to your blogger account, goto TEMPLATE/THEME then select EDIT HTML
Now you check for the box next to expand widget templates, scroll down until you see the below code
<b:if cond='data:post.includeAd'> <data:adEnd/>
<data:adCode/> <data:adStart/> </b:if>
                      
Now replace the above code with the one below

<b:if cond='data:blog.pageType != "item"'> <b:if
cond='data:post.includeAd'> <data:adEnd/>
<data:adCode/> <data:adStart/> </b:if> </b:if>

Now press CTRL F on your keyboard (if you are using a laptop) and a search box will appear. Type <body> and tap Enter. Now locate the <body> tag. But if you are using mobile phone, scroll down until you find the <body> tag.  
If you want your ads to show above the posts paste the below code just above the <body> tag
But if you want it to show below the posts, then paste the code just after the <body> tag.
Here is the code

<b:if cond='data:blog.pageType == "item"'> <b:if
cond='data:post.includeAd'> <data:adEnd/>
<data:adCode/> <data:adStart/> </b:if> </b:if>


When you are done, click SAVE TEMPLATE and you are done

Post a Comment

0 Comments