|

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

Share this:

Similar Posts