how to add stumbleupon to wordpress

You were searching for "how to add stumbleupon to wordpress". These posts might be of interest:

  • No related posts.

Add StumbleUpon to WordPress Blog

Filed in: Weblog, WordPress — October 8th, 2006

advertisement

My StumbleUpon PageStumbleUpon News announced that now we can integrate StumbleUpon with our blogs. It allows visitors directly submit your posts to StumbleUpon(SU).

Here is the tutorial for adding StumbleUpon link to WordPress.

StumbleUpon integration code for WordPress

By referring to the SU integration code, here is the SU integration code for WordPress blogs:

<a href=”http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>”><img src=”http://www.stumbleupon.com/images/stumbleit.gif“/> Stumble it!</a>

The code will create something like this: Stumble it!

Hint: Feel free to change the icon by replacing the filename(stumbleit.gif) with other StumbleUpon icons.

Install StumbleUpon code for WordPress

  1. Edit “single.php” of your WordPress theme
  2. Find the following line(or similar, depends on your theme file) in “single.php”

    <?php the_content(’<p class=”serif”>Read the rest of this entry »</p>’); ?>

  3. Immediate after the line, add the SU integration code for WordPress.
  4. Now, your code should look like this:

    <?php the_content(’<p class=”serif”>Read the rest of this entry »</p>’); ?>

    <a href=”http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>”><img src=”http://www.stumbleupon.com/images/stumbleit.gif”/> Stumble it!</a>

  5. Save and upload “single.php” back to your WordPress theme folder. Done!

My two cents

I hope you like this little WordPress hack. Why not a plugin? Well, I do not create another WordPress plugin for a simple link.

If you have difficulty to implement this, feel free to Contact Me. :)

By the way, this is My StumbleUpon Page. Please add me as your SU friend. :)

Popularity: 3% [?]

Bookmark and Share

Read also:

What do you think? 25 Responses to “Add StumbleUpon to WordPress Blog”

Comments Feed | TrackBack URL
  1. #1
    Hello Ashok! » Blog Archive » Integrate Stumbleupon In Your Blog Says:

    [...] Since I find Stumbleupon, I become a fan of this site as this is a great source of free traffic. Since begining when I found this site, I wanted that we should be able to add thumbup icon to our blog, so that visitors could thumbup our article through our blog. Today while reading liewcf blog, I found that Stumbleupon has announced the facility to Integrate StumbleUpon with our Blog. Which allows the visitors to submit new articles directly from the page they are viewing. [...]

  2. #2
    A.H Says:

    Thanks for the mini tutorial Liew, i’m sure a lot of us will find it handy.

    Allen.H

  3. #3
    Malaysian Food Review Says:

    yup, must say, it is pretty useful, maybe you should list them with all other code like del.ico.us, my yahoo, google reader, boing boing and etc. so we can add them one shot

  4. #4
    Undertypo Says:

    There is a plugin that no need to edit any of your wordpress default php file.

    Give it a try.

    Social Bookmarks – http://www.dountsis.com/

  5. #5
    lucia Says:

    hey i just found out stumble upon is available as an extension for firefox. using it as an extension and intergrating it in blogs is different? what will the extension do i wonder?

  6. #6
    jared l. Says:

    cool stuff!

  7. #7
    LcF Says:

    @Malaysian Food Review: you might want to install somekind of social links wordpress plugin such as sociable.

    @lucia: In short, StumbleUpon extension is for YOU, and StumbleUpon link on your blog is for your READERs.

  8. #8
    lucia Says:

    liew, i sent you an email seeking your help on how to do this (integrate SU in my blog). did you received it?

  9. #9
    LcF Says:

    @lucia: yes, received and replied.

  10. #10
    Dennis Bjørn Petersen Says:

    Liew, thank you very much for this guide, but what should I do if my theme doesn’t have a single.php file.

    I’m using Vistered Little 1.6 from http://scarylittlemonkey.com/

  11. #11
    LcF Says:

    @Dennis: your theme has combined index.php with single.php. You need to edit “index.php” file.

  12. #12
    How to integrate StumbleUpon to your WordPress blog - JohnTP.com Says:

    [...] SU can be integrated to your WordPress blog in 2 easy ways. LiewCF recently explained the direct method of adding StumbleUpon to your WordPress Blog. [...]

  13. #13
    Dennis Bjørn Petersen Says:

    Thank you for your help. It semi-worked ;)

    The text got there but not the button and nothing happens except an error when you follow the link.

    Again thank you very much for your time and help :-)

  14. #14
    LcF Says:

    @Dennis: I don’t see the SU code on your blog now. I guess you removed it. Please mail your previous code to me, and I try to help again. :)

  15. #15
    Jojo Says:

    Hi Liew,
    I follow your tips but it doesn’t work. There’s a link without an icon. When I press the link, it gives me the following error.

    There’s been a problem finding the page you’re looking for. Apologies. Perhaps . . .

    * the page your looking for was moved
    * your referring site gave you an incorrect address
    * something went terribly wrong

    Use the search box and see if you can’t find what you’re looking for.

    Appreciate your help. Thanks.

  16. #16
    LcF Says:

    @Jojo: I have no way to help if you.. 1. remove the code on your blog. 2. do not send me the code you used.

  17. #17
    Michael Josh Says:

    Thanks for this. I just added the code to the links for digg and delicious that I somehow (don’t remember how) added to my WP template.

    Someone wrote a plugin here. But now that I use WordPress Widgets I can’t use it. That’s really what I’d love to do on my sidebar. Something similar to recently posted delicious links.

  18. #18
    Eugene Says:

    Added this on my site as well. Thanks for the code.

    If you guys are looking to integrate Digg, Del.icio.us, Yahoo, Google, Stumble Upon (code from this site) on your wordpress installation, click my name here or go to :

    http://www.evsionlab.com/2007/04/05/how-to-digg-it-delicious-it-google-it-yahoo-it-and-stumble-it-on-wordpress/

    Thanks,
    Eugene

  19. #19
    Lola Says:

    Hi

    I don’t have the required line in single.php so put it in page template where found the line. But there is nothing showing up at all, what am I doing wrong?

    Thanks

    Lola

  20. #20
    Lola Says:

    Hello again

    I’ve just changed my theme and have put the line of code in the right place. The stumble icon is in my “share it” list, is there a way for it to display with clicking on “share it”?

  21. #21
    Lola Says:

    Sorry!

    Ignore previous 2 posts managed to sort out, but can’t get the icon to appear under my posts. Help, keep getting the red cross.

    Thanks

    Lola

  22. #22
    Andy Bailey Says:

    i made a widget for stumbleupon to show icons to your last favourite sites, you can see it at

    http://www.fiddyp.co.uk/2007/09/06/stumbled-a-stumbleupon-widget-for-wordpress-22-released/

    also a plugin to detect an incoming stumbler and encourage them to give you a thumbs up

    http://www.fiddyp.co.uk/2007/09/06/hello-stumbler-wordpress-plugin-for-stumbleupon-visitors/

    I hope you like them!

  23. #23
    Brian Purkiss Says:

    Thanks so much!
    I just added that to my site!

  24. #24
    Leon Says:

    Thank you for this. I’ve been looking for it for a while.

  25. #25
    Turkey Says:

    I didnt manage to get code from stumble page so hope yours will work! Thanks! I need it for my blog about turkey

Comments are closed. Submit your comment here