![]()
Twittar Overview
Twittar is a great WordPress plugin that works with your comments section of your blog. If you are already using Gravatar images to pull an icon/avatar for each commenter, you will know the frustration when most of your comments are showing the default Gravatar Image. This is because most commenters don’t have a Gravatar account. Twittar solves this problem by finding not only the commenter’s Gravatar icon, but also there Twitter icon too!
That sounds great! More images in my comments!
Exactly! More images in your comments looks great. Now, lets get this plugin installed on your website.
![]() |
Step 1: Download
Download the Twittar plugin here: Download Twittar Plugin WordPress |
![]() |
Step 2: Install
Extract the Twittar Folder from the .zip and copy the Twittar Folder to your plugin folder (wp_root/wp-content/plugins). |
![]() |
Step 3: Activate
Login to your WordPress dashboard, then navigate to Plugins » Installed. Scroll down to Twittar and click activate. |
![]() |
Step 4: Edit comments.php
Open up your comments.php file and find the position you want the gravitar / twitter avatar to appear and insert this line of code: [sourcecode language="php"] [/sourcecode] |
Function Parameters
Want to Customize the way your twittar is hown? No problem! Heres the list of parameters you can change.
twittar(size, placeholderimg, border, class, usegravatar, rating);
size
The size of the avatar (in pixels). Just insert the number (e.g. 45), without “px.” It is the size for both width and height.
placeholderimg
The URL for the image you want to use when the user has neither a Twitter account nor a gravatar. Must be inside quotes (””). Optional.
border
The color for the 2px border. Insert the hexadecimal code of the color (e.g. “#FFFFFF” with the “” marks) but only if you want to use one.
class
A CSS class that you want to use to style the avatar. For example: “myimg.” In the CSS, you would include .myimg { }. Put inside “”.
usegravatar
Just insert 1 if you want to use gravatars, and 0 if you don’t. If you choose to use gravatars, it will try to load a gravatar image if a Twitter account and picture is not found, otherwise it will load the placeholderimg (default) image directly.
rating
Parameter for gravatars only. Read more at www.gravatar.com.
Note: if you want to skip a parameter and add another in front of it, just replace it with “”.
Special Thanks
Thank you to Smashing Magazine for yet again another great plugin for WordPress Websites.



