Better Click To Tweet: My Second WordPress Plugin

Better Click to Tweet is my second official plugin in the WordPress repository. Like most second plugins, this one is far more advanced than its older brother. For starters, I am beginning to grasp more advanced concepts like internationalization, and this plugin comes ready to translate into different languages, depending on the language of your WordPress install.

It started as a search for a plugin to create simple, styled boxes in posts that would allow readers to click on a link that produces a ready-made tweet. Like this one:

The Better Click To Tweet plugin is simple, user-friendly, and translation ready! Click To Tweet

Go ahead and click on the text above, it will pull up a tweet that links back to this post, and gives you the ability to immediately click to tweet it (it has an extra step to let you customize the tweet to your liking!)

I went in search of that functionality, and found a plugin that I liked parts of, but not how it handled the actual meat of the process. It’s pretty technical to explain, but the short version is that the original plugin doesn’t properly use the WordPress shortcode API (because it was written before such a thing existed), and it also makes some mistakes in calculating the number of non-Roman characters like © or ∆ or œ.

Also, at the time, the plugin I based mine off of had an annoying “powered by” link that appeared in every box. In addition to being annoying, it’s against the WordPress rules.

I was going to suggest some changes to the original plugin, but as I went to do so I noticed it had been pulled from the repo (the WordPress overlords were obviously displeased by the “powered by” link as well). So I set out rewriting the plugin from the ground up, using the official shortcode API, and some other tricks I learned.

Thanks to Canva for the great little icon!
Thanks to Canva for the great little icon!

Long story short, the original plugin is now back in the repo (sans the “powered by” link) but mine was released in the meantime.

Since its launch, my improved plugin has been downloaded more than 1,000 times, with only 3 support requests.

If you’re looking for a great way to drive twitter engagement on your blog, give my plugin a shot!

Here’s the official plugin on the WordPress repo.

Oh, and if you want folks to come read this cutting-edge journalism:

The story of how I got over 1,000 downloads of my second straight #WordPress plugin. Click To Tweet

6 Replies to “Better Click To Tweet: My Second WordPress Plugin”

    1. Hey Bonny! To edit the size, you’d have to be familiar with a little bit of CSS, and use the declaration .bctt-ctt-text a { font-size:#### !important;} and a.bctt-ctt-btn { font-size:#### !important;} replacing the #### with your preference. You’d add that to your theme’s CSS files, so that it isn’t overwritten by updates to my plugin.

      Hope that helps!

  1. Hi Ben! Glad to be using your plugin..but is there any other way to edit the font style and sizes aside from css?

    1. Hey Ena,

      CSS is the best and easiest way. Give it a shot, and I think you’ll be surprised how forgiving of a programming language it is. I have no plans to offer any other way to modify the style.

      Thanks for using my plugin!

Comments are closed.