This plugin has been closed and is no longer available for download.

WP Tweet Button


This plugin easily and fully implements Twitter’s official Tweet Button on your WordPress blog or site. The tweet button can be positioned as you please and can be styled to your delight in the settings page. You can configure individual messages for your posts, use the title of your entry or a default message for tweets.

WP Tweet Button supports a variety of shorteners and can even help track the effectiveness of campaigns using Google Analytics.


  • General and post specific settings for recommendations and Tweets text.
  • Vast array of Tweet Button placement and alignment options.
  • Universal shortlink configuration.
  • WPTouch Support.
  • Can be set to vertical, horizontal or no counter.
  • Authors can configure their own Twitter accounts on their profile pages. (WP3.x only)
  • Supports customizable Auto-Tweeting.
  • Supports all Tweet Button languages.
  • Supports exclusion by custom post type
  • Possible to add rel=”me”, rel=”shortlink” to header and rel attribute to the tweet link for SEO.
  • Google Analytics support for campaign tracking.
  • Option to switch between ‘{text} {link} via {@user}’ and ‘RT {@user} {text} {link}’ formats.
  • Templatable Tweet texts using tags (%POSTCONTENT%, %POSTTITLE%, %BLOGTITLE%, %BLOGHASHTAGS%, %BLOGHASHCATS%).
  • Supports data tag output.
  • Includes hooks for 3rd party developers.
  • Supports WordPress 3 shortener functions.
  • Initial URL shrinking with the Twitter Friendly Links Plugin and YOURLS: WordPress to Twitter Plugin.
  • Initial URL shrinking with 3rd party shortening services:,,,,,,, snipr,, tinyurl
  • counturl support for consistent url counts across URL shorteners.
  • Supports option to load the script in the footer.
  • Referral can be turned off by removing the username.
  • Additional styling options.
  • Supports automatic placement and manual using tweetbutton(); function or [tweetbutton] shortcode.
  • Supports forced manual placement for a combination of placements.
  • Includes caching controls for WP Super Cache and W3 Total Cache.
  • Tweet Button can be excluded from bottom of posts on front page.
  • Optional no-javascript support.


This plugin features built-in tips but you may also find the FAQ or WP Tweet Button‘s page useful.


  • WP Tweet Button displayed on a post.
  • WP Tweet Button controls for posts and pages.
  • WP Tweet Button settings page.
  • WP Tweet Button help sections.
  • WP Tweet Button Advanced settings includes Google Analytics Campaign Tracking.
  • Twitter Tweet dialog.
  • Users can follow you and a recommended user after their tweet is sent.


Follow the steps below to install the plugin.

  1. Upload the WP-Tweet-Button directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. Go to Settings/WP Tweet Button to configure the button. Add your Twitter account.


How come the tweet count doesn’t change right away?

Twitter uses a caching system that periodically updates the tweet counts. Your browser also caches the iframe containing the count. Both these caches need to expire before any changes are made apparent.

How do I add the post title or blog title in custom tweet texts?

You can use the %POSTTITLE% and %BLOGTITLE% tags to do this. These tags are valid in the WP Tweet Button general configuration and in your posts’ Tweet Button settings.


  • New blog entry: %POSTTITLE% #cats

“#cats” in this example is a tag that’s relevant to your blog.

  • New blog entry: %POSTTITLE% - %BLOGHASHTAGS%

In this example %BLOGHASHTAGS% will be replaced with #hash tags generated using your blog entry’s tags. You can also use %BLOGHASHCATS% to generate #hash tags using the entry’s categories.

How do I create custom recommendations for each separate post/page?

Simply edit your post and set your recommended user in the Tweet Button options box.

How do manually create the Tweet Button in my template code?

To create the Tweet Button manually, call the tweetbutton(); function.


  • echo tweetbutton();
  • $myCustomPlaceForSocialMedia .= tweetbutton();


  • echo tweetbutton($post);
  • $myCustomPlaceForSocialMedia .= tweetbutton($post);

The tweetbutton function currently includes 3 optional parameters: $thepost, $bwdata and $type.

tweetbutton([object $thepost][,boolean $bwdata][,string $type]);

  • $thepost – Defaults to $post and is the post object.
  • $bwdata – Defaults to false. Set this option to true if you want to generate the button using HTML5 data attributes.
  • $type – Defaults to the setting set in the options page. Set this parameter to ‘vertical’, ‘horizontal’ or ‘none’ to change the type of button.

You can skip parameters by setting them to null (Resulting in default values). Example:

echo tweetbutton(null,null,'horizontal');
How does auto-tweeting work?

Auto-tweeting using the WP Tweet Button is performed by service running on a centralized server. This is done not only to avoid the need to register an application for each blog, but also to ensure your tweets are formatted correctly in different languages.

When auto-tweeting, the plugin collects the information it needs for the tweet and sends it to the tweet server encoded in Base64. The encoding is done to avoid formatting issues. Auto-tweet are performed once per new or saved post depending on your configuration. Auto-tweeting is also performed for scheduled blog entries.

Plugin doesn’t work for some reason. How I contact the author?

You can either leave a comment on the plugin’s page, or contact the author on twitter (@TCorp).

Contributors & Developers

“WP Tweet Button” is open source software. The following people have contributed to this plugin.


Translate “WP Tweet Button” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Added SSL support.


  • Fixed Google Tracking link.
  • Updated preview images.


  • Added option for blogs experiencing character encoding issues.


  • Added option to exclude button blow posts in the archives (No After in Archives)
  • Optimized code resulting in cleaner text cuts
  • Added support for %POSTCONTENT% variable in tweet customizations
  • Added “Long Tweet Mode” (In case you don’t want to use %POSTCONTENT% as your “Custom text”). This allows you to auto-tweet the first part of your content followed by a link that takes the reader to the entry on your site.
  • Links are included in all Autotweets by default. Option to select action has been removed.


  • Added support for # Analytics query delimiter (for people that use setAllowAnchor). Enabling this option may require clearing your shortlink cache by using the “Delete all previously saved shortlinks when I save.” option.
  • Prevents id duplication when forcing manual placement.


  • Contains Bugfix related to stuck shorturls after previewing post.


  • Added option to use author configured twitter account as recommended user.
  • Added RPC publishing auto-tweet support.
  • Added oAuth enabled tracking under Advanced Settings.

  • Added support (requires PHP json)
  • Cleaned up some code.
  • Added validation tests.
  • Resolves issue where superfluous requests to shorteners are sent.
  • Additional settings for auto-tweeting.
  • hasbutton bugfix in manual placement


  • New feature allows admins to set default twitter account, ignoring author settings.


  • Bugfix related to shortlinks and links on main page.

  • Improved shortlink handling in WordPress 3.1. Shortlink settings in this plugin can be set as universal by checking the “Add rel=shortlink to head” box.


  • Addresses issue related to related users.
  • Addresses issue related to Transposh Translation and short URLs.
  • Addresses issue related to links on main blog page.

  • Addresses issue where a single shortlinks is generated and saved for all posts on the main page.
  • Added option to clear shortlink cache per post/page.


  • Transposh Translation Filter support.
  • Added option to remove styles in RSS feeds.
  • Improved compatibility with All in One SEO (thanks to monodistortion)


  • Bugfix related to Auto-Tweeting and custom menus.
  • Added option to delete all previously saved shortlinks.


  • Fix for sites that don’t have PHP5.


  • Supports Auto-Tweeting.
  • Supports rel=”shortlink”
  • Supports exclusion by custom post type.
  • Added option to strip www from WordPress 3.0 shortener.
  • Added option to disable shortener.
  • Resolves issue with blogs where home is not the front page.
  • Bugfix for users (keys should be entered).

  • Bugfix for sites that don’t use permalinks.


  • Added option to place script in footer instead of header.
  • Faster execution due to code optimization.
  • Additional filters added allowing developers to add their own URL shorteners.
  • Removed IDN URL from the tweet button at the bottom of the config page.

  • Support for PHP versions lower than 5.
  • Bug fix for sites with multiple users.


  • Added “Force manual placement” option.
  • Added rel=”me” option.
  • Added %BLOGHASHTAGS% and %BLOGHASHCATS% options.
  • Added support for no-javascript clients as an option.
  • Adjusted for Twitter’s new javascript.

  • Added support.

  • Added support.


  • Typos and spelling. No functionality updates.


  • Google Analytics support for campaigns.
  • Added more placement options (archives, search, excerpts).
  • Option to exclude button from the bottom of posts on front page when before and after is selected.
  • Templating related bug fixes.
  • Users can set custom hook priority for advanced positioning.


  • test builds classified as 1.9.2


  • Saves options in an array (fewer DB requests)
  • Resolves quotes bug.
  • Option to add rel for SEO.
  • Better RSS support.
  • Better templating support.
  • Added hooks for developers: wp_tweet_button_long_url, wp_tweet_button_url, wp_tweet_button
  • Supports output in data tags.
  • only supporting manual placement inside the loop.
  • built-in alignment.
  • Caching options for WP Super Cache and W3 Total Cache.


  • More discreet controls for post/page edit screens.
  • Added support to disable button for mobile browsing using WPTouch
  • counturl support added for consistent url counts across URL shorteners


  • Object oriented codebase
  • Removed need for JSON library (Resolves issues with some hosts)
  • Button on posts is a switchable option.
  • Uses newer API.
  • Uses simplified API.
  • Supports excerpt compatibility for poorly written templates.


  • Minor plugin conflict resolved.
  • Fixed incompatibility bug for WP2.8 users.
  • Fixed save bug.
  • Added support for WordPress 3 shortener functions.
  • Authors can configure their own Twitter accounts on their profile pages.
  • Added referral formatting options.
  • Added support for optional URL shrinking services:,,,,,,
  • Added support for the Twitter Friendly Links Plugin
  • Added support for the YOURLS: WordPress to Twitter Plugin
  • using wp_register_script for widgets.js


  • Custom tweet text bug fix
  • Option for each blog post to have its own custom tweet text.
  • Custom tweet texts can include tags like %POSTTITLE% and %BLOGTITLE%


  • Option box in posts included for easy configuration of Tweet Button per post.
  • Option box includes optional disabling of tweet button per post.
  • Option box includes recommended user and description.


  • RSS feed option
  • No more default CSS
  • Internationalization
  • Fixed manual content missing bug.
  • Added better control of tweet text.
  • Cosmetic changes.


  • Added support for recommendations.
  • Added support for custom recommendations for each post (Read FAQ).


  • Cosmetic changes to the settings screen.
  • Tweet Button Language enabled


  • First build