How To Add ShareThis Buttons for Email, Twitter and Facebook in WordPress

How To Add ShareThis Buttons for Email, Twitter and Facebook in WordPress
  • Twitter
  • Facebook
  • LinkedIn
  • Delicious
  • Google Gmail
  • Google Reader
  • WordPress
  • Blogger Post
  • Share/Bookmark

ShareThis just made it even easier to add social networking buttons on your website or blog!

Monday night, ShareThis released new functionality to their ShareThis button, one of the first social media buttons available to bloggers and website owners. By adding a snippet of code, ShareThis makes it easy for your visitors to email, tweet and share your content. You also get traffic information.

I just updated my ShareThis button which now supports multiple icons so you can individually list email, Facebook, Twitter, Digg and ShareThis as seperate icons! Before, it was sort of confusing and you had to receive a secret email from ShareThis.

Not anymore! ShareThis is rolling out the code tonight to all accounts!

And I’m going to show you how to get it setup in this tutorial.

Visit ShareThis.com

http://sharethis.com
Click, “Get The Button”

Choose ShareThis Breakout buttons aka “Mulitple Icons”
media_12675096596644.png

Select, “Multiple icons”

Select your platform

media_12675097540184.png

Select the location you will be embedding the ShareThis button
In my case, I will select, “WordPress”

Generate the code

media_12675097872214.png

Click, “Get The Code”

Grab the code

media_12675099300084.png

You will see a screen like this.
The top code goes into your header.php file in your WordPress theme between the <head> and </head>
The bottom code goes into your single.php and/or page.php WordPress files based on where you want the buttons to show up.

I like my buttons at the top so let’s see how this works!

Edit Your Files

media_12675104461844.png

I am using Filezilla to access my WordPress files via FTP.

WARNING ONE
- Backup your files before you start editing your WordPress theme. It will save you a lot of headaches later on.

WARNING TWO
- If you use the built in “Editor” in WordPress and make a mistake, there is no undo so I highly encourage you to use a text editor like Edit Pad Lite (PC) or TextWrangler (Mac) along with an FTP client when making changes to your WordPress theme.

Get to your WordPress theme

media_12675105295914.png

To get to your WordPress them, you want to drill down. This is shown on a host that supports cPanel
Go to: public_html > wp-content > themes
and select your theme

Inside you will find the header.php and single.php files
Your file names may vary. Check your theme documentation

WordPress theme directory

media_12675107422404.png

This is a classic example of a WordPress theme directory.
Once inside, we can see that many of the common files to create a WordPress theme are here including:
page.php
single.php
header.php
style.css
search.php
archive.php
index.php
footer.php
sidebar.php
functions.php
404.php

I have several additional files for page templates I’ve created (I love to use Google Docs to embed forms in my contact pages!) plus some additional templates that came with the theme.

The only one’s we’re touching today are header.php, single.php and page.php

Open header.php with text editor

media_12675110317214.png

Here, I’ve right-clicked on the header.php file within Filezilla. Since I’ve already associated it with my text editor (in this case, Edit Pad Pro since I’m on a Windows 7 box and purchased the Pro version), the file will now launch for me.

View the header.php file

media_12675111563054.png

Grab the ShareThis code from the top box

media_12675111898114.png

Code will go in the blank area before </head>

media_12675112508284.png

Code inserted!

media_12675112684624.png

Save the file

media_12675113027384.png

Upload via FTP

media_12675113151724.png

Grab the code for single.php from ShareThis website

media_12675116164444.png

Open up single.php

media_12675113598664.png

Here’s single.php in Edit Pad Pro

media_12675113909374.png

“Reading the tea leaves” – single.php code

media_12675114097954.png

Same code but on the front end of WordPress

media_12675114730784.png

Code inserted!

media_12675115096484.png

Time to save single.php

media_12675115422854.png

Ta Da! There are our buttons!

media_12675114378894.png

Related posts:

  1. How To Twitter Your Flickr Photos
  2. How To Twitter Your Flickr Photos [VIDEO]
  3. Contest Time! Retweet the hashtag #frsh today on Twitter to Win WordPress Training!

  • Twitter
  • Facebook
  • LinkedIn
  • Delicious
  • Google Gmail
  • Google Reader
  • WordPress
  • Blogger Post
  • Share/Bookmark

 

View Comments

  • Steve Ragan March 2, 2010

    Great post, I love the walk through.

  • Sharing Buttons Are The New Word of Mouth | But You're A Girl March 2, 2010

    [...] created a tutorial on how to add the new “multi icons” into your WordPress blog over at [...]

  • robate159 March 13, 2010

    Online Training Program

    Whether you are thinking about getting your bachelor’s, masters or doctorate degree, online education can be a great option for anyone with a busy life. When you are a parent or a busy career person, it can be hard to go back to school. Maybe you feel that too much time has passed since you were last in college or high school, and you would feel uncomfortable in a formal education setting……………

    http://www.sangambayard-c-m.com

  • Joanne May 27, 2010

    how do I add these buttons to my email signature… I'm using Outlook?

  • Joanne May 27, 2010

    how do I add these buttons to my email signature… I'm using Outlook?

Sorry, the comment form is closed at this time.

blog comments powered by Disqus