How To Add Digg, Stumble, Twitter Share Buttons On Your WordPress Blog

A week back I wrote how to add author box on your wordpress blog without using any plugins. I got responses, and few of my friends asked to tell about adding Digg, Stumble , Twitter buttons on the Home Page of the Blog like i have did.

So, here I am explaining how to add a Digg share button, Stumble share button, Twitter share buttons on the wordpress blog without any plugins. I don’t use plugins for these small tasks as more and more plugins and make your blog slower than usual.

Here is simple code, which I am using on my home page of SaveDelete for the purpose.

<script type="text/javascript">tweetmeme_source = 'iliketocollect'; tweetmeme_url = '<?php the_permalink() ?>'; </script> <script type="text/javascript" src="http://savedelete.com/wp-content/themes/SD/js/button.js"> </script> <a href="http://www.stumbleupon.com/submit?url='<?php the_permalink() ?>' &title='<?php the_title() ?>' target="> <img style="border: 0px none; background: none repeat scroll 0px 50% transparent; padding: 0px;" src="http://savedelete.com/wp-content/themes/SD/images/stumble.jpg" alt="" /> <script type="text/javascript"> digg_url = '<?php the_permalink() ?>'; digg_title = '<?php the_title(); ?>'; digg_window = 'new'; </script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

To support this code to look good we also need to add some of the CSS.

.left { float:left;}
.twitme { padding: 0 6px 3px 0;}

That’s it .. The Above code is just placed before the

<?php the_excerpt (); ?> or <?php the_content (); ?>

The image for Stumbleupon and Twitter .js Script is been located on my server, so I will recommend you to use your own path. As I will be changing things in future and you don’t want to have things broken at your end someday.

here is the screenshot what it looks like on my blog from the homepage.

If you have any doubt, or any suggestion, please share it with us in the comments below.

About Jaspal

Mechanical Engineer, Blogger and a Web Designer from Jaipur, The Pink city of India. You can follow him on Twitter & you can connect with him on Facebook
This entry was posted in Design and tagged , , . Bookmark the permalink.
You might want to subscribe to the RSS feed for updates. If you wish to subscribe here via Email, then kindly click here.

Connect with SD on FACEBOOK easily

20 Responses to How To Add Digg, Stumble, Twitter Share Buttons On Your WordPress Blog

  1. Pingback: uberVU - social comments

  2. Pingback: How To Add Digg, Stumble, Twitter Share Buttons On Your Wordpress Blog « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit

  3. Thanks for the article, I was waiting for it since our previous chat about these social icons.

    Once again thanks for sharing.
    .-= provamsi @ india365´s last blog ..Most Relaxing Online Games on the Internet =-.

  4. Pingback: === popurls.com === popular today

  5. Pingback: wp-popular.com » Blog Archive » How To Add Digg, Stumble, Twitter Share Buttons On Your Wordpress Blog

  6. Pingback: How To Add Digg,Twitter Share Buttons On Your Wordpress blog | twittersRus.info

  7. Pingback: Tweets that mention How To Add Digg, Stumble, Twitter Share Buttons On Your Wordpress Blog -- Topsy.com

  8. Pingback: How to Add Plugin-Free Twitter, Sphinn, and Facebook Buttons to Your Wordpress Blog | The Social Robot

  9. element321 says:

    Great post.

    I have been working on manually adding the submit buttons as well. So far I need to style them and figure out the best place to put them.

    Thanks for sharing your code. I might try it and see if it looks good set up the same way.
    .-= element321´s last blog ..Book Review: Problogger Secrets for Blogging Your Way to a Six-Figure Income =-.

  10. I’m also a big believer in hard coding versus plugins as much as possible. I think it lends to less plugin conflicts as well as quicker loading times. Thanks for the sharing this code as this is the next project on my site to-do list.
    .-= CJ @ Niche Writing´s last blog ..CreativeAce Grand Opening – Online Store =-.

  11. Thanks for the code…
    Surely it will save a lot of time[loading speed]
    .-= Tricks tips´s last blog ..TeraCopy – Copy all Files at Lightning Speed =-.

  12. Pingback: Traducir RSS

  13. Pingback: TraVotez

  14. Pingback: TraVotez

  15. webwhiz says:

    Thanks Mate I am using this now to my blog.
    .-= webwhiz´s last blog ..WordPress Default Replacing Double Dash with Em-dash Make it Stop =-.

  16. CSSReX says:

    Thanks for the info. I want custom link to add for stumble upon. Please let me know if you have any ideas!
    .-= CSSReX´s last blog ..Free Twitter Background (PSD Included) =-.

  17. Don'tclick says:

    Excellent code that reduces the use of plugins, keep on writing such items. Congratulations.
    .-= Don’tclick´s last blog ..Northern Europe airports closed =-.

  18. Siddharth says:

    Really a wonderful and neat one.. i got to see this first on mashable..

  19. Abhishek says:

    Another solid article…will definitely give it a try…..

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Subscribe without commenting