WordPress.org

Ready to get started?Download WordPress

Forums

TweetMeme Button
Manually add the tweetmeme button? Code? (10 posts)

  1. phattrance
    Member
    Posted 3 years ago #

    Whats the code for manually add the tweetmeme button on my theme? i cannot find it anywhere.

  2. kikamagazin
    Member
    Posted 3 years ago #

    Hallo normaly it should be <?php tweetmeme(); ?> but in my Blog it doesn´t work ;(

  3. phattrance
    Member
    Posted 3 years ago #

    same here, that php code did not work!

  4. Samuel B
    moderator
    Posted 3 years ago #

    plugin page says
    Compatible up to: 2.7.2

  5. LethosDesigns
    Member
    Posted 3 years ago #

    I'm not sure when it was changed, but use
    <?php echo tweetmeme(); ?>

    I looked at the code, and it seems this function just calls for the neccessary code from another function assuming you've set in the options to use "manual" setup. But it doesn't display it for you automatically.
    Thus since all it returned was a string, you need to echo it to display it.

    More plugins seem to be doing this, not really bothered to track down why yet.

  6. jk_
    Member
    Posted 3 years ago #

    Hi there,

    Using : <?php echo tweetmeme(); ?> works ok!

    But I was wondering if it's possible to use display manually the typical twitter button... When I set the option to manual and the use the code : <?php echo twitter(); ?> it doesn't work!

    Any ideas?

    Cheers.

  7. s0fa
    Member
    Posted 3 years ago #

    @jk_

    I'm also wondering the code to manually add the Twitter button. I don't get why the manual codes are not displayed on the plugin page

  8. s0fa
    Member
    Posted 3 years ago #

    @jk_

    solved it on my own. apparently there is no function for manual output like the tweetmeme, so I just added this to the twitter.php file

    // Manual output
    function twitter_button() {
        if (get_option('twitter_where') == 'manual') {
            return twitter_generate_button();
        } else {
            return false;
        }
    }

    and then add this to wherever you want the button to go:

    <?php if(function_exists("twitter_button")) echo twitter_button(); ?>

  9. Janu Studio
    Member
    Posted 3 years ago #

    @s0fa Thanks alot buddy thanks a tons u saved alot of time...

  10. deemorgan
    Member
    Posted 3 years ago #

    @s0fa thanks mate this worked a treat been looking for this for ages. might want to send this to tweetmeme and ask them to make a point of this in their documentation.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags