Since I have uploaded the Follow me on Twitter badges one question I get a lot is “How do I put them on my site/blog?”.
So, this is a brief guide to using the Twitter badges – both for using a single badge or rotating a selection of badges. I hope it will make things a bit easier for tweeps out there.
Using just one badge
- Save them up on your computer;
- Upload them – using your method of choice – to the server hosting your blog/website; if you’re on WP there is a Upload Images button in the Add Media menu that you can access from the Write area.
- Select the desired destination, e.g. a sidebar HTML widget and paste the following tag in:
- Replace “yourdomain” with the URL of your blog/site; “images” with the folder you uploaded the image and “twitterbadgename.png” with the name of the respective image file. And you’re done!
<a href="http://twitter.com/yourtwitterhandle"><img src="http://www.yourdomain.com/images/twitterbadgename.png" alt="A Twitter Badge"></a>
Now if your blog doesn’t support sidebar widgets or you want to include it in your template, e.g. in the comments area, you’ll have to change your theme code. This might get a bit tricky if code is not your forte. However, I’m happy to try and help – contact me using our contact form with a bit more info and we’ll see if we can sort it out.
Rotating a selection of badges
Following a question about a WP widget that could rotate these, I have found a WordPress plugin that already rotates images every time the page loads – I have used it for the badge to the right of this paragraph.
The technique actually works with any site, not only with WordPress.
I requires a .php file to be uploaded within the same directory as the images to be rotated and then called as any image, e.g.
<a href="http://twitter.com/yourtwitterhandle"><img src="/dropbox/2003/rotate/rotate.php" alt="A Random Image" /></a>
Obviously, use the correct image location.
That’s it – enjoy your new badges!