Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 down vote accepted

Have you tried using the do_shortcode() function?

EDIT

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()

EDIT 2

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
add comment

Your Answer

 
discard

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.