Herself’s Webtools

Webtools for Webmasters: Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Herself’s Webtools header image 1

How to add ‘reddit’ links to your blog posts

May 16th, 2007 · 5 Comments

First backup your template.

Go to Layout->Edit HTML and click download full template.

Blogger
<a expr:href=’”http://reddit.com/submit?” + “url=” + data:post.url + “&amp;title=” + data:post.title ‘ target=’_blank’>Reddit</a>

For Blogger go to your Template->Edit HTML and click expand widgets.
Find

It’s about three quarters of the way down in most templates.

Then just add the above code just below that line.

Wordpress

<p><a href=”http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>” >reddit</a></p>

You will want to edit your template to add the link.
Go to Presentation->Theme Editor

Select Main Index Template, or index.php or what ever the index page is called in your template.

Find the section that has the postmetadata add the above code in there somewhere that looks nice on your template.

See also:
How to add Digg Links to Blogger and Wordpress Posts
How to add Del.icio.us Links to Blogger and Wordpress Posts
How to add Stumble Upon Links to Blogger and Wordpress Posts

Tags: blogger · blogger template · hack your template · how to · wordpress

5 responses so far ↓

  • 1 Sheffield Tiger // Oct 12, 2007 at 6:45 am

    Useful resource for these code snippets - cheers.
    Just a minor typo in your reddit code, a missing ‘

    Working code should be:
    reddit

    (also confused users as to why codes doesn’t work if they copy and paste should know it’s all about the ” and ‘ )

  • 2 Sheffield Tiger // Oct 12, 2007 at 6:45 am

    Sorry, not used to wordpress, try again

    reddit

  • 3 Sheffield Tiger // Oct 12, 2007 at 6:50 am

    Nevermind, I’ll just describe it.

    On the blogger code, there should be a ” before &title=”

  • 4 admin // Oct 12, 2007 at 7:04 pm

    Sorry, I meant to look at this as soon as I has some coffee this morning and it buried.

    I’m not sure - but it’s in front of me so I’ll have an answer up this evening.

    Thank you!

  • 5 admin // Oct 12, 2007 at 7:46 pm

    Thanks it is correct on the post now. There were two quotations missing. One before url and one before title.

    I tested it again and you should be able to type it exactly as above.

    Thank you for letting me it was broken. Clearly I had too little coffee that day.

You must log in to post a comment.