|Tested up to:||3.2.1|
WordPress generates shortlinks for your posts and pages. By default it uses the
?p= with the post ID added to it, but if you have a rather long domain name this isn’t extremely useful. If you use Bit.ly, or even better, Bit.ly Pro, this Bit.ly WordPress plugin will help you: it replaces the shortlink WordPress generates with a proper Bit.ly shortlink.
How this Bit.ly WordPress plugin works
In WordPress 3.1+ it will also replace the Shortlink Admin bar menuitem with a new Bit.ly admin bar item, allowing easy access to the Bit.ly shortlink, the possibility to tweet it and the stats for that shortlink:
Clicking the Bit.ly main menu item or the submenu item Bit.ly Link will result in a prompt with the current page’s Bit.ly link:
Clicking Bit.ly Stats will open a new window with the Bit.ly link with a + added to it: the stats page for that Bit.ly link. Clicking Share on Twitter will open Twitter with the status set to the title of the post + the shortlink.
Of course this plugin also fixes the “Get Shortlink” button on your edit post / page pages, the one next to View Page:
To work, the plugin needs a bit.ly username and API key. You can find your API key on your Bit.ly Settings page. Then add the following to your site’s wp-config.php, anywhere before the “stop editing here” line. Don’t forget to replace “<your username>” and “<your API key>” with respectively your username and API key:
/** * Settings for Bit.ly Shortlinks Plugin * http://yoast.com/wordpress/bitly-shortlinks/ **/ define('BITLY_USERNAME', '<your username>'); define('BITLY_APIKEY', '<your API key>'); // optional, if you want to use j.mp URLs instead of bit.ly URLs define('BITLY_JMP', true);