Monday, December 06, 2010
- Log in to Adsense
- Generate code required for displaying appropriate ads on you blog and paste it to a notepad
- After pasting the code to the notepad, remove the line breaks and comments from the Adsense code. Make sure that you code looks like the following (do not to modify any script of Adsense, just remove the line breaks and comments alone)
- Your Adsense code is ready now. Lets modify blogger template
- Log in to your blogger account select Layout of the blog which you want to modify
- Navigate through Template --> Edit HTML
- Take backup of your template by clicking Download Full Template. This backup will help you if you want to revert to old template
- Select Expand Widget Templates option to get access to the full code of the template
- Search for <data:post.body/> in the template HTML and place the following before the <data:post.body/>
<b:if cond ='data:blog.pageType == "item"'><!-- Paste your adsense code prepared in step 3 here --></b:if>
- Replace the text <!-- Paste your adsense code prepared in step 3 here --> with the adsense code which you prepared in the step 3 using notepad.
- After completing the replace operation, code in your template should look similar to the following
- Save the template by clicking on Save Template button
- That's all. Your Blogger template is configured to display ads only in the post pages
Why Ads are not displayed?
This happens if you modify any attributes of Google Adsense ads by mistake while removing the comments and line breaks. To solve the problem, get the Adsense code again from Google Adsense and remove the line breaks and comments carefully.
Why Ads are displayed in a table with borders around them?
This happens when the line breaks and comments are not replaced from the Adsense code pasted in Blogger Template. Remove all the line breaks and comment start tags and end tags to solve the problem.
If you face any other problems, please post a comment. Just comment here and I will help you to solve the problem.
You can follow us on Twitter or Join us on Facebook to receive all updates . . .