After coming across Jaspal’s brilliant blog post, How To Add Digg, Stumble, Twitter Share Buttons On Your WordPress Blog, I tried to add it to do my site. However, I decided that I didn’t really know how to host the javascript images that Jaspal suggests and I wanted to have Twitter, Sphinn, and Facebook buttons instead of Digg and StumbleUpon because my blog is mostly about social media and search engine marketing.

So, after several tries, I modified the code using javascript that is already hosted as sites like TweetMeme and Sphinn. That way you can just pop in the code and you’re ready to go!

Thanks to Jaspal for the inspiration!

Paste the following code above the  line code <?php the_excerpt (); ?> or <?php the_content (); ?> in the ‘single.php’ file of your theme. (Find this by going to ‘Appearance’ then ‘Editor’ on the left hand WordPress navigation panel.)

<div class=”left”>
<div class=”twitme”>
<script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/
button.js”></script>
<br clear=”all”><br clear=”all”>
<a name=”fb_share” type=”box_count” href=”http://www.facebook.com/
sharer.php”>Share</a><script src=”http://static.ak.fbcdn.net/connect.php
/js/FB.Share” type=”text/javascript”></script>
<br clear=”all”><br clear=”all”>
<script type=”text/javascript”>submit_url = “http://yourdomain.com/yourpage.php”;</script>
<script type=”text/javascript” src=”http://sphinn.com/evb/button.php”></script>
</div>
</div>

<div>  <div>  <script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script><br clear=”all”><br clear=”all”> <a name=”fb_share” type=”box_count” href=”http://www.facebook.com/sharer.php”>Share</a><script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share” type=”text/javascript”></script><br clear=”all”><br clear=”all”> <script type=”text/javascript” src=”http://sphinn.com/evb/button.php”></script></div></div>

Next, you’ll need to add CSS to your stylesheet, as Jaspal mentions. Go to your stylesheet.css file, and at the bottom, paste the following:

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

Then you should be good to go! Please note that the buttons won’t show up in your index page, just your permalinked individual blog post pages.

Kelsey Jones

Kelsey Jones

Founder/Chief Marketing Consultant at Six Stories
Kelsey Jones helps clients around the world grow their social media, content, and search marketing presence. She enjoys writing and consuming all kinds of content, both in digital and tattered paperback form.
Kelsey Jones
Kelsey Jones
Kelsey Jones

Latest posts by Kelsey Jones (see all)