Friday, 14 August 2015

How To Align Google Adsense Ads Below Post Title To Left, Right Or Centre With Conditional Tags in Blogger

Monetizing your blog or site with Google Adsense is surely one of the best ways to earn money online with your blog. But in other to increase your Google Adsense earnings, you will need to place the Google ads in areas on your blog that is visible to your blog visitors because these are adverts and they need to seen by them.


One of the best places to display Google Adsense on your blog is below the title of each post.

Read this post on how to place Google ads below the post title of each blog article to learn how to do it.

But in today's tutorial, I will only show you guys how to align these Google adsense ads to display either to the left side below your post title or to the right side or even at the center of your post title for higher click-through-rate (CTR).

If you don’t know how to create a new ad unit to place on your blog, then read one of my post here. How to create a new Ad unit and place on your blog.

Aligning Google Adsense Ads Below Post Title to the Right

==> Log on to your Blogger account, navigate to Template.

Note: Make sure to Backup your blog template before doing any changes.

==> Click on Edit HTML button and Press Ctrl+F then search for this code below

 <data:post.body/> 

==> Then look for the Google Adsense ads code you paste in the template. Copy them all and paste in a notepad before you remove the one from the template.

==> Copy only the adsense code in the notepad and paste it where you see PLACE YOUR AD CODE HERE in the codes below. 

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div align=”right“> // Please type this line manually or it may give you an HTML error.
PLACE YOUR AD CODE HERE
</div>
</b:if>

==> Then copy all the adsense codes and paste it in your template then save and preview.

==> The ad below post title will appear at the right side.

Note: If you want to show it at the left side or at center, replace right in color red in the code above to left or center.

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 at your ad. The Ads will be shown below all post’s titles which means if you have set 5 posts to appear on your homepage then it will only appear below first 3 post’s titles. The last two will be shown as blank white space. I recommend that you 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>

That is all. I hope this info helps? 

No comments:

Post a Comment