Home / functions.php / Add Tweetmeme button to your post with shortcode
  • How to Add Tweetmeme button to your post with shortcode

    add-tweetmeme-button-to-your-post-with-shortcode

    Adding this snippet to the functions.php of your wordpress theme will let you add the Tweetmeme button to any location within your post.

    wordpress snippet : PHP

    <>
    function tweetmeme(){
      return '<div class="tweetmeme"><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div>';
    }
    add_shortcode('tweetmeme', 'tweetmeme');
    

    wordpress snippet : SHORTCODE

    <>
    [Tweetmeme]
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_shortcode,