WordPress shortcode for ShareThis buttons

I like using ShareThis for social sharing button, but one thing that was certainly missing for the default ShareThis WordPress plugin were shortcodes. Luckily WordPress makes it really easy adding them :) So to get shortcode for ShareThis integration just add the following few lines to the end of the functions.php in your theme folder:

/**
* Creates sharethis shortcode
*/
if (function_exists('st_makeEntries')) :
add_shortcode('sharethis', 'st_makeEntries');
endif;

Once that’s done you can use [sharethis] shortcode anywhere on the page/post to get sharing buttons rendered there. Short and sweet :)

30 thoughts on “WordPress shortcode for ShareThis buttons

  1. Hey, thanks for this tip. I use ShareThis on our Art of Draw Something site but needed a shortcode to get it on one of our pages. Your trick to change the functions.php works like a champ!

    If you play Draw Something, come check out the great drawings on our site and upload your own. We’ve got a slick Draw Something Cheat app, too, to help you solve words for lame drawings you get!

  2. Pingback: Shortcode for ShareThis Buttons - Web, Dev, Love at Web, Dev, Love

  3. Works but I still have a problem with this plugin: buttons appears at the end of the post only after refreshing the page?
    Any issue about that?

  4. I added this into a calendar plugin and got no results. I am trying to add share buttons on the event info pages of WP Calendar which does not have this capability built into it currently. Anyway, I added the code into the functions.php of the plugin and nothing. Any suggestions appreciated. Thanks

  5. Thanks for the share. The code worked great for me.

    I don’t understand why ShareThis hasn’t added this to their plugin already and is making this seem so difficult. One simple bit of code and it’s done.

Leave a Reply to Lurg Cancel 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>