Mar 25

How to Add Plugin-Free Twitter, Sphinn, and Facebook Buttons to Your WordPress Blog

  • Sharebar

After coming across Jaspal’s brilliant blog post, How To Add Digg, Stumble, Twitter Share Buttons On Your WordPress Blog, I tried to add the buttons using the method he explained to The Social Robot. 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.

Related posts:

  1. Free Social Media E-Book Downloads
  2. Free State Social Re-Cap: Sarah Evans
  3. Free State Social Re-Cap: Chris Brogan
  4. Traveling Dress Inspires Blog Posts
  5. Blog for Your Readers, Not For Google

3
comments

  • http://savedelete.com Jaspal

    Hi kelsey

    thnx for mentioning and your buttons look really cool ;)
    .-= Jaspal´s last blog ..How To Add Digg, Stumble, Twitter Share Buttons On Your WordPress Blog =-.

  • http://usedhorsesaddles.net/ Maria E. Brown

    I would love to add these plugins to my beloved site here. Thank you for having this around somehow.

  • http://e-tech-world.com mohammad

    your nice blogging help us very much. thanks brother.