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.

I'm using the WP-TweetButton but when I set the settings to add the button manually. Nothing is displayed.

Settings:enter image description here

The Code:

    <div id="social-buttons">
                        <div id="tweet-button">
                            <?php tweetbutton(); ?>
                        </div>
                        <div id="fb-share"><?php if (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div>
                        <div id=fb-like><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px"></iframe></div>
                    </div>
                    <div id="next"><?php previous_posts_link( __( 'next &rarr;', 'twentyten' ) ); ?></div>
                <?php endif; ?>
            </div>

I'm using Wordpress 3.1.2 and the last version of the plugin.

Is anyone having this problem too? Have anyone managed to fix it?

share|improve this question

closed as off-topic by kaiser Jul 21 at 19:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

    
why did I get down voted? –  janoChen May 7 '11 at 5:36

2 Answers 2

Looks like you've mis-named the function. It is the_tweetbutton(), rather than tweetbutton().

Also, you should always wrap Plugin-added function calls in if (function_exists()) conditional wrappers.

Putting that together, this:

<div id="tweet-button">
      <?php tweetbutton(); ?>
</div>

Becomes this:

<div id="tweet-button">
      <?php if ( function_exists( 'the_tweetbutton' ) ) the_tweetbutton(); ?>
</div>
share|improve this answer
    
@Chip Bennet Thanks! So the official documentation is wrong: wordpress.org/extend/plugins/wp-tweet-button. Supports automatic placement and manual using tweetbutton(); –  janoChen May 5 '11 at 13:52
    
Apparently so, I guess. I just looked at the Plugin's PHP file in trunk. :) (What do the instructions say on the Plugin Settings page?) –  Chip Bennett May 5 '11 at 13:54
    
@Chip Bennett There's nothing. Well, I will try the function you suggested when I come back home. Thanks again. –  janoChen May 5 '11 at 14:16
    
Ah, well I was looking at trunk. Maybe the documentation has been improved since the last-tagged version? –  Chip Bennett May 5 '11 at 14:52
    
@Chip Bennett Weird. I tried that but still no luck. –  janoChen May 7 '11 at 5:21
up vote 2 down vote accepted

I finally, got it;

<?php echo tweetbutton(); ?>

share|improve this answer

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