|

Add StumbleUpon to WordPress Blog

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. :)

SU, wordperss, blog, stumbleupon, tips, social, web

Similar Posts

23 Comments

  1. 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

  2. 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?

  3. @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.

  4. 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 :-)

  5. @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. :)

  6. 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.

  7. 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.

  8. 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

  9. 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”?

  10. 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

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

Leave a Reply

Your email address will not be published. Required fields are marked *