make money online

Hacking Blogger Beta: Adding Adsense, Digg Buttons And Anything To Every Post

I’ve received a lot of e-mails recently asking me how I’ve added the Adsense, Digg buttons and subscription links to every post on my site. Even though my site is quite customized now and doesn’t look like a standard Blogger.com blog (hopefully!) it is hosted by Blogger which doesn’t automatically provide the facility to add elements to every post.

However, it’s incredibly easy! So let’s go through it step-by-step!1. Go to the ‘Edit HTML‘ part of your blog’s Dashboard and backup your template by clicking ‘Download Full Template‘. Why? Because mistakes happen!

2. Click the ‘Expand Widgets‘ checkbox to show your complete template.

3. Do a search or scroll down to find <data:“>post.body/> This piece of code represents the body of the posts in your blog. Hence, adding Adsense code immediately before this will result in your Adsense ads being displayed between the posts title and body. Adding Adsense code immediately after this will result in the ad being displayed between the body and comments links. For Adsense to display correctly, you’ll need to remove the <!– tag from the Adsense code

4. Save it and take a look at your blog! You should have now have Adsense incorporated into your posts.
Remember, Adsense limits the number of text/image ads to three per page. So if you’re just using the ads in the posts, it will only display for the first three posts. Similarly, if you’re displaying ads in your sidebar the number of ads displayed in posts will be limited.

Also remember that when it comes to sidebars, your blog is read from left to right. Therefore, if you have more than two posts displayed on a page and Adsense code in your right sidebar, the right sidebar ads will not display. Adsense will display the ads in your first three posts and then not be able to display it in the sidebar.

No problem!
Adding Digg buttons to your posts is exactly the same process. You can find a whole lot of buttons to display by going to the Digg site or clicking here. However, most of these are purely links to the Digg homepage. The best piece of code that I’ve found is this one:

<script type=’text/javascript’>
digg_url = ‘<data:post.url/>;’;
digg_skin = ‘compact’;
digg_title = ‘<data:post.title/>;’;</script>
<script src=’http://digg.com/tools/diggthis.js‘ type=’text/javascript’/>


This piece of code is the best as it enables your readers to not only ‘Digg’ the post from your site but also to submit the permalink of your post to Digg. And it will display for every post.

Simply by adding any code you like to the appropriate part of you template, you can add anything you like automatically to all of your posts! For example of how it can look, simply look at the end of this post!

Happy customizing!


Rich people subscribe to Cash Quests




18 Comments »

I learned these hacks couple of weeks ago and they’re really useful, so I think this post will be a great resource to your readers.

P.S. You should consider going back to the old headline, it looks much better.

by Alex

 

yea and the cool kids got bogged down with the slow loading caused by overloaded server…

by sylv

 

Thanks for the info about Adsense. I may have to give that a try! More good information to use!

caplondon

http://lasvegasfun.blogspot.com/

by Caplondon

 

your comment about Wordpress - A self-hosted Wordpress is actually for people like me who are MOST comfortable with customizing and self-coding our stuff.

I’m a professional web designer/coder and I would never use any other hosts, I only self host all of my stuff.

by jeffkee

 

Good hacks Kumiko, dugg it :D

Regarding adsense in post though, I think you will have to alter the adsense code in some way either Escape HTML entity or remove Comment Tags.

Happy Blogging!

by Stavanger

 

Thanks stavanger! I’d forgotten that point. I’ve made the addition to the post to add that info in!

Regarding the Wordpress comment, it was a bit of a joke - please don’t take it to heart! :) I’m well aware that Wordpress has many advantages.

Kumiko
xo

by Kumiko

 

Hi,
Are you sure that your digg code is correct? It seems to me that there is missing end script tag(I can not write it here) at the end. But I am not sure…

by TJ

 

The script end tag is on the second to last line.

Kumiko

by Kumiko

 

Hi Kumiko,
Thanks for such valuable information.

Well, I’m sorry to ask. Kinda new with all this HTML stuff. I’ve found the “data:post.body” but what exactly do I put in. What adsense code?

Thanks a million.

Newbie Blogger

by Terence Tan

 

Terence - Once you’ve signed up for Adsense, you’ll be able to start building ads to put on your site. Once you’ve completed designing your ad, you’ll be given some HTML code to put on your site. That’s the Adsense code.

Kumiko

by Kumiko

 

Hey Kumiko,
I was looking through some old posts of yours and I found this - it was really helpful!
I always used to manually tack everything on at the end by copying and pasting, but now, not anymore… :)
I added the Digg thing. It works great. However, it only shows for all the posts on the FIRST page. I went to the second page, “older posts”, and it doesn’t show for those.
My blog is http://super-blogging.blogspot.com
Is it supposed to be like that or did I do something wrong?
Thanks,
Tay

by Tay

 

Yes, it does work. But once you remove the code which you mention; it becomes invalid.

Since, it does not work when < ! - - is present, I guess the hack does not work anymore? According to Google Adsense policy too, one should not change the code. Thus making it invalid.

by Anonymous

 

I am a blogger from wordpress, I have tried so many times in trying to put a digg button on my blog but I have yet to succeed. Maybe I have a very low understanding in this tagging. Please help me where to insert digg codes properly.

Email me : jaytm_lexus@yahoo.com

by Anonymous

 

Take a look here…. :-)

Blogger Hack - Adsense hack - How to do, step by step main official site - Simple instructions

http://surfparadise80.blogspot.com/2007/04/blogger-hack-adsense-hack-how-to-do.html

by Anonymous

 

HI
Tried adding DIGG tool in blogger but it did not appear.Is the Html given complete.
My site is related to reviews of good sites Best Site To get your Blogs and Sites Reviewed

by kavita

 

[…] How to add Digg and other links to every post […]

by Free Blogger Templates » Make Money Online at Kumiko's Cash Quest

 

I know why this code isn’t working for some people. It’s the single quote. If I cut and paste the code from your page, the single quote I get is this ‘

by Melissa

 

Great. That comment didn’t work. Let’s try this again!

If you copy and paste the code from this page the code won’t work because the single quote is slanted. It looks like this: ‘

All those need to be changed to straight single quotes like this: ‘

If all these ‘ are changed to regular ones like this ‘ the code will work. (I know it may look the same on your machine but just go ahead and change them all on your own computers and it will work!)

by Melissa

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.