An Update for Better Click To Tweet Power Users.

I love the smell of freshly baked plugin updates.
I love the smell of freshly baked plugin updates.
Recently my most popular WordPress plugin got a sweet little update for which the changelog simply says

“added the ability to specify a custom URL as a shortcode parameter.”

Allow me to expound on that.

This change to the plugin is HUGE for power users, because now you can put any link you’d like in a proposed tweet.

Every other similar plugin gives you the ability to link back to the post you are on (and only to that post). Now with Better Click To Tweet you can add a link to anywhere in a tweet for users to click and share!

So, if for example I want to promote (and provide a way for my readers to promote) my favorite YouTube comedy duo, now I can make a box that looks like this:

Easily some of the most ridiculous stuff you'll see on the 'net. Share on X

…and gone is the link back to the post you are currently reading!

The shortcode I used to created that box looks like this:

[bctt tweet="Easily some of the most ridiculous stuff you'll see on the 'net." url="http://rhettandlink.com"]

Easy-peasy! A few things to note:

  • URLs with non-ascii characters (éåø and the like) are not currently supported. This is a limitation of PHP, and something I’m working to fix in a future release. For now, you can shorten those urls using bit.ly and that’ll solve the problem.
  • You must include the http:// or https:// at the beginning of the url parameter.
  • If your URL has the & symbol in it, it’ll confuse Twitter, and things will go badly. To avoid this issue, manually shorten your custom URLs that have that symbol in them using a service like bit.ly before inserting it in the shortcode.

Happy blogging. Don’t be scared to donate if my plugin has helped make your life easier. That’s how you keep good freelance developers in business.