Adding Adsense To Blogger Blog Posts

Google Adsense

You must have seen many blogs displaying Adsense ads below the Blog Title or at the end of the post and must have tried doing the same without any success. The main problem is that Blogger doesn't allow you to add the Adsense code directly to your blog template.

For adding Adsense to your blog post you have to first convert the Adsense code and then it is possible to add the code to your blog template without any error. Visit the Adsense Ad Code Converter to convert the code.

Now that you have converted the Adsense code by visiting the above link, its time to paste the code in the Blogger template.

Just follow the steps given below:

Step 1:
Login to your Blogger Account. You will be taken to the Blogger Dashboard. You will see a list of blogs or only 1 blog. It depends on the number of blogs you have. Click on Layout.

Blogger Basics

Step 2:
Now you will reach the Layout section where you can see the basic framework of your blog and all the Widgets or Gadgets as they call it now. At the top of the page you will see some links. Click on Edit HTML.

Blogger Basics

Step 3:

Click on
Expand Widget Templates

Expand Blog Template

Step 4:

Now search the following code in the template


If you want to display the ads at the start of the post, then paste the code above <data:post.body/> and if you want to display the ads at the end of the post, then paste the code below it. However you will have to add the Adsense code between two lines of code before adding it to the template.

Now paste the Adsense code between these two lines of code

<b:if cond='data:blog.pageType == &quot;item&quot;'>
Paste the Adsense Code here

The main reason for pasting the Adsense code between the 2 lines is that it wont display the ads on the Home Page. The ads will be visible only when you visit the blog post. This is important as Google allows only 3 ad units per page. Most of the blogs display 5 posts per page, because of which 5 ad units will be visible on the Home Page which is against the rules. But if you want to display the ads on the Home Page and have only 3 or less posts per page, then you don't need to add the above code to your Adsense code.

Now save the template and check your blog posts. The adsense code will be visible in the posts.