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=”
<br clear=”all”><br clear=”all”>
<a name=”fb_share” type=”box_count” href=”
sharer.php”>Share</a><script src=”
/js/FB.Share” type=”text/javascript”></script>
<br clear=”all”><br clear=”all”>
<script type=”text/javascript”>submit_url = “”;</script>
<script type=”text/javascript” src=””></script>

<div>  <div>  <script type=”text/javascript” src=””></script><br clear=”all”><br clear=”all”> <a name=”fb_share” type=”box_count” href=””>Share</a><script src=”” type=”text/javascript”></script><br clear=”all”><br clear=”all”> <script type=”text/javascript” src=””></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