WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am Using Wordpress Blog.Here i want Use Tweetmeme Plugin.I want to show the output of the Tweetmeme Plugin to Customizing place(Side of the Post[Not Before or After]).The Plugin Creators are providing Shortcode.Shall i Use this shortcode in Template?I Guess this is not possible.So we need to change Shortcode as a function.How to Create a function from Shortcode?please help me.

share|improve this question
up vote 3 down vote accepted

Have you tried using the do_shortcode() function?


I'm not familiar with the TweetMeme shortcode, but here's an example usage for putting a NextGen Gallery directly into a template file:

echo do_shortcode( '[slideshow id="1" w="603" h="270"]' );

Simply replace with the appropriate shortcode (and parameters) for TweetMeme.

Codex ref: do_shortcode()


With TweetMeme, you have another option:

  1. Change the Plugin "where" setting from "shortcode" to "manual"
  2. Place the tweetmeme() function in your Theme template file where you want to output the TweetMeme button.
share|improve this answer
your Answer was Excellent. But it's not working for Tweetmeme plugin. I added this coding... <?php do_shortcode('[tweetmeme]');?> <?php echo do_shortcode('[tweetmeme]'); ?> Anything Wrong here? – Ramkumar Jun 21 '11 at 13:58
Why are you calling do_shortcode() twice? Also, see my edited answer for another option. – Chip Bennett Jun 21 '11 at 14:19
Thx yaar,It's Working fine... – Ramkumar Jun 21 '11 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.