- Log into your AdSense control panel and choose the ad unit you would like to be displayed. Be sure to keep the width of your posts in mind: some are wide enough to feature a 468x60px banner, while others may be restricted to the half-banner width of 234px.
- Copy the code and paste into a text editor (such as Notepad). You'll need to change some of the characters in this code in order for it to display in your blog. Don't worry, this doesn't contravene Google's T&C's for AdSense, as I'll explain later.
- Your code will look something like this:
You'll need to change the < and > in red to the following:
< = < ; > = > ;
- Now, log in to your Blogger dashboard and go to Template>Edit HTML, and tick the "Expand widget templates" box. Ensure that you backup your template before making any changes.
- Find this section of code using the search function of your browser (usually CTRL+F):
<p><data:post.body/></p>
- To feature ads immediately after your post titles, insert your AdSense code just before this section in your template. To feature ads at the end of every post, paste the code immediately after instead.
- Save your template to see the ads in action!
Do be aware that if there are more than 3 ad units on a page, not all of the ads will be displayed; if you feature a number of ads on your main Blogger page, ads will not display in all of the posts, though they should be displayed on the post pages.
As I mentioned earlier, modifying the AdSense code in the way I have described will not contravene AdSense terms and conditions: all you are doing is substituting the < and > for the HTML encoding for these characters. When you look at the source code for the page, the AdSense code will display as it was originally written. This modification will not alter the functionality of the code at all, and ensures that it will be displayed. The code as first presented will not display in the body of Blogger posts!
For examples of how this code should be implemented into your blog template, take a look at this page (opens in a new window).
Next: How to display ads in the body of the post itself.
Technorati Tags: adsense post+titles blogger template



27 Comments:
You'll need to change the <> in bold to the following: < = & lt; > = & gt;
There is nothing in the code that is highlighted in Bold. Deeply appreciate some clarification
My apologies, Anonymous! I'd written the post in HTML and had forgotten that Blogger needs different tags to make text bold! But for some reason, it still wont display as bold, so I've highlighted the characters in red instead. I've also modified the < and > as I'd made spaces which shouldn't be there. Hope this clarifies things for you. Feel free to email me if you need further help :)
Thanks Amanda for your prompt reply. I've tried to replace the code but keep getting errors. It will be great if you can show what's the code like before as well as after the code is modified. Deeply appreciate a reply
Hello Anonymous,
I've written up examples of the code implementation in a separate page so as not to clutter this post with code. The link is near the bottom of the post above. I hope this helps you insert your Adsense code into your posts. BTW, what error messages are you getting when trying to insert the code? If you're still having problems, it may help if you let me know what this is.
Hi Amanda
You've been an awesome help. Thank you for your time and awesome assistance. Really love your website. Will definitely refer your website to my friends.
This post was a blessing! I've been looking for this for so long.
Thanks a lot for the post, this workaround, and the gold mine your blog is!
HI amanda,
Nice blog,but am getting this error.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "lt" must end with the ';' delimiter.
@Crazykinux: Thanks for your comments, I'm really glad these hacks work so well for you :)
@Anonymous: I think there must be an unnescessary space between your "< ;" (possibly the closing > ; too). I had to write it this way in order to get this comment to show without substituting the code for the HTML characters! Try deleting the spaces and see if this works for you. If you still have problems, send me an email and I'll mail you the code in text form for you to copy and paste into yout template.
Hi Amanda-
Great post! I've actually built a javascript ad code converter which will automatically replace the < and > characters (and also quotes and &) for this exact purpose. You should check it out!
Blogger Ad Code Converter
Thanks,
David
Thank you for letting us know about this, David :) I'll be sure to check it out.
Thanks Amanda, I was looking for this trick to show Adsense Ads at bottom of my posts. It's working smooth.
I have chosen the option of showing ad only when individual post is opened. For home page I do not show ad at bottom of every post.
Thanks.
Amanda could you help me ? I had an error message like this "Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly.
XML error message: The content of elements must consist of well-formed character data or markup". May be I should send you my template html and please do for me.Honestly I don't understand html.
Thanks for the idiot-proof explanation. I was able to implement it on my blog without any problem. I was able to tweak this code a bit to post them on the left.
Hi Amanda,
First of all, I love your site! It's very neat and professional, and your explanations are very clear.
However, I'm also getting the same error as YuLianto. I have tried clicking on the example of the code implementation, but there's an error with that page.
Would appreciate your help!
@Jane: I'm sorry that the example code page is not working. I haven;t deleted this, and can only expect it is a problem with my hosting.
In the meantime, you may want to take a look at the source code of this page to see how Adsense works in the Blogger template code.
In the source code, the < parts will appear like this: <. But I hope this will give you an idea of how the code should appear in your template.
The "Your template could not be parsed" error usually happens when using incomplete code or when accidentally deleting a character or two of code from your template.
If you're still experiencing problems, please email me a copy of your template code and I will help you add the code.
Adı : Sibel Yapal
İL : Tokat
İlçe: Reşadiye.
D.Tarihi : 1980
Cinsel Tercihim : Lezbiyen
Benim gibi düşünen Yirmi otuz yaş arası bayanlarla tanışmak istiyorum.
Use the blogger template for adsense. It works great. Download it here
What a great tip - it *finally* worked for me after I figured out that I needed to include the semicolons. I, too, kept getting that parsing error message until I inserted the semicolon after each code thingie.
Thanks for the tip! :-)
Hi Amanda,
First THANKS a lot for you.
I had the same error & I have the solution.
We need to clear our cahe.
In Firefox:
1. click on the Tools menu and select Clear Private Data. Or (Ctrl+Shift+Dell).
2. remove the "checks" from everything except Cache (Cache has to be "checked")
3. click on Clear Private Data Now (on the bottom)
In Internet Explorer:
1. click on the Tools menu and select Internet Options
2. click on General tab
3. under Browsing History click on Delete
4. when the window pops up, click Delete Files in the Temporary Internet Files section
In Opera:
1. click on Tools menu and click Delete Private Data
2. click on the Details
3. remove "checks" from Delete cookies, Saved passwords (and others you don't want to delete)
4. click on Delete
In Safari:
1. click the Safari Menu and select Empty Cache
2. when the window pops up, click on Empty
In Chrome:
1. select the tools menu (the spanner,wrench icon) in the upper-right corner
2. click on the Clear Browsing data
3. click on the Empty the cache check box. Remove the "checks" from the things you don't want to delete (like Cookies, History...)
4. from Period drop-down menu, select the one. If you don't know what to choose, click on the Everything
5. click on the Clear Browsing Data
In Konqueror:
1. click on Settings and select Configure Konqueror
2. scroll down and select Cache
3. click on Clear Cache
Or visit this blog:
http://pocket-templates.blogspot.com/2008/12/clear-your-cache-how-to.html
Then we need to change our code Adsense:
You'll need to change the < and > and " to the following:
< = <
> = >
" = "
Now, your code it will be as below;
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxx";
google_ad_slot = "yyyyyyyyyy";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script
src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
Good luck!!!
Hello,
Thanks for your useful tips, this blog is really amazing!
I already have a blog and use an Adsense account with some banners on top, left column, ect... but I didn't have any between my posts. I discovered this option when editing the design of the blog posts on Blogger. I am using text links each 2 posts.
What do you think is the best for use, your way adding the code directly to the template or using the Blogger option?
Do they pay the same? because I have notice that since I am using this blogger option , the clicks pay less
Sincerly,
Fred.
Hi,
Thanks for the tip that was my first step into embedding adsense in my blog. In case anyone is interested I have documented a method to add two ad units anywhere in the new blogger post body. You can read it here
Adsense always takes new steps for its publishers.
Amanda, Please help me, i want my adsense appear just in single post, not home and archieve. Adsen limit just 3 ads unit, when I click archieve/label post, there are blank space in the fourth post. How to fix the problem?
I find this post quite interesting. I have been tring to place a widget in the post. Keep the hsrd work
Adsense keeps on making changes.
hello
i really don't understand how to go about this ...i want to place a text link at the end of each post i make...and i don't understand what you mean by this "and" pls i need more clarification on this...my blogsite....is "www.diabetic-coma.blogspot.com"...moreso google is showing irrelivant ads on ma site...is there anyway you can help me on this...
Just replacing the starting '<'and ending '>'with codes given works for me.
the following link will help u
http://www.eblogtemplates.com/blogger-ad-code-converter/
Post a Comment