RAQ: Adding a Twitter Badge on WordPress.com

This wasn’t so much a question as it was an expression of dismay from a Twitterbud I met at the Ragan/SAS conference last week. Dave tweeted thusly:

The only significant disadvantage of hosting a blog on WordPress.com is that javascript-based widgets that you can easily insert in Blogger or Typepad don’t work. The Automattic guys only allow HTML, not java, in widgets because they don’t want to take the risk of malicious code being used to hack their 4.4 million-blog fortress.

So when Dave lamented this feature, I Tweeted back that he could work around it as I had in my sidebar widget.

Then I took a look at my sidebar and realized that I had just a plain old text link that said:

Follow Lee Aase on Twitter

And I resolved to fix it so Dave and other SMUGgles could do likewise, and have something more like this, that people can click and go to my Twitter profile:

Follow Lee Aase on Twitter

So how do you do it?

Go to your WordPress.com blog’s dashboard. Choose “Design” and then “Widgets”

Then, from the column of available widgets on the left, click “Add” next to the Text widget:

When the widget is added to the bottom of the right-hand column, click the Edit link:

And then paste the following text into the body of the widget (substituting your name and your Twitter profile URL for mine, of course):

<a href=”http://twitter.com/LeeAase“><img src=”http://assets1.twitter.com/images/twitter_logo_s.png” alt=”Follow Lee Aase on Twitter” /></a>

Then click the “Change” button

And “Save Changes”…

And when you go to the front page of your blog, you should see the sidebar look something like this (I combined Technorati and Twitter into one widget):

Updated 12/22/08: In response to a comment below, go here to see how you can have your latest Tweets show up in your sidebar.

Author: Lee Aase

Husband of one, father of six, grandfather of 15. Chancellor Emeritus, SMUG. Emeritus staff of Mayo Clinic. Founder of HELPcare and Administrator for HELPcare Clinic.

8 thoughts on “RAQ: Adding a Twitter Badge on WordPress.com”

  1. Without seeing exactly what you have in the widget, it’s hard to tell, but it seems you have something amiss in the syntax of the link to the Twitter image. I posted exactly the code I used, so you might see if anything got mixed up in your copy/paste.

  2. that’s interesting, but definitely not at alternative to actually displaying the twitter updates…. what is up with wordpress? do they have a bias against twitter?

  3. It’s a problem with javascripts. For security reasons, WordPress.com doesn’t allow scripts to be embedded in widgets. You have to be on your own host to use these badges. But I have a way around it that I will explain in a new post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.