Come to our today’s tutorial which is about how to show Google Adsense Ad below post titles in blogger. So, let start the tutorial.
Creating Google Ads
- Go to your Google Adsense account.
- Create a new ad unit.
- For better results choose wide area ad sizes like 300*250 Medium Rectangle or 336*280 Large Rectangle.
- Customize your ad colors and click on save and get code button.
- Select Synchronous in the code type and copy the ad code
- Now parse this code using this HTML Parse Tool to change special characters into their corresponding HTML entities. The ads won’t appear if you use that code directly.
- Now copy the parsed code.
Adding Google Adsense in Blogger Below Post Titles
- Go to Blogger >> Template.
- Note: Take Backup your blog template before doing any changes
- Click on Edit HTML button.
- Copy all the template code and paste it to notepad file
- Press Ctrl+F and search for
<data:post.body/>
- Now paste below code just above it.
<b:if cond='data:blog.pageType == "item"'>
PLACE YOUR AD CODE HERE
</b:if>
- Replace PLACE YOUR AD CODE HERE with your parsed ad code.
- Click on save template button.
- You are done!
Once you performed these steps then visit any of your blog posts. Ad below post title will look something like this:
<b:if cond='data:blog.pageType == "item"'>If you are unhappy with the results and want to wrap text around Google adsense ads like this:
<div align=”center“> // Please type this line manually. It can give you an HTML error.
PLACE YOUR AD CODE HERE
</div>
</b:if>
<b:if cond='data:blog.pageType == "item"'>Replace left to right if you want to show ads on the right side wrapped with text.
<div style=”float:left; margin:10px;”>
PLACE YOUR AD CODE HERE
</div>
</b:if>
Note: Observe that all of the above codes are added between conditional tags which will show ads only on post pages neither on homepage nor on labels page. If you want to show ads on every page then remove those conditional tags.
If you are showing ad on homepage and label pages also then take a look on your ad. It will be shown below all post’s titles means if you have set 5 posts to appear on your homepage then it will only appear below first 3 post’s titles. Last two will be shown as blank white space. I recommend you to show ad below first post title only. Replace above conditional tags with below ones to show single ad on homepage and labels page below first top most post’s title.
<b:if cond='data:post.isFirstPost'>
PLACE YOUR AD CODE HERE
</b:if>