Display Twitter profile picture on wordpress comments

Categories: Design

Well this title is not new to some of wordpress blogger. Since I started blogging (to be honest very new), hovering those entire beautiful blog site existed, I always wondered how they can manage Twiiter avater in their comment area. Did they built their own plug-in or there might be a web service by twitter? While searching on goggle I got some blog post on SmashingMagazine and in WpBeginner, both described step by step approach towards your twitter based avatar for wordpress. Plugin named “Twittar” by SmashingMagazine and Ricardo Sousa. You can have a look at that post here.

twitter-bird-wallpaper

But I found one in WordPress Plugin website name “Twitter Avatar” developed by BusinessXpand.com and author Thomas McGregor. It allows user to post there twitter username while they submit their comments. Below I will give some features and show how you can install this plugin to your wordpress theme.

What this “Twitter Avatar” do?

Twitter-avatar

That picture tells everything, isn’t it?? Yes, you can have an additional text field for your commenter to submit their twitter username. Moreover it will show links to their twitter profile next to comment. Needless to say default avatar will be replaced by that twit commenter as well.
I personally liked it because it is customizable. You can give additional Css styling yourself which will fit with your designed template.

How to install?

Only problem I found with this problem is “You have open comment.php and insert some code” apart from that this plugin is fine. Well here we start…

  1. Download the plugin to your wordpress plugin folder ex: www.myblog.comwp-contentplugins
  2. Go to your dashboard click plugins
  3. Activate the plugin
  4. Go to edit themes and click on “comment.php
  5. There you will find
    <?php wp_list_comments(); ?>
  6. Replace that with this code:
    <?php ( function_exists('twitter_comment') ?
    'twitter_comment' : null ), 'avatar_size' => 96 ) ); ?>
  7. Again in the same file find this block :
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php
    echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req)
    echo "aria-required='true'"; ?> />
    <label for="author"><small>Name <?php if ($req)
     echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req)
    echo "aria-required='true'"; ?> />
    <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>Website</small></label></p>
    
    <?php endif; ?>
    
  8. Just Bellow this code insert the following code:
    <p><input type="text" name="author_twitter" id="author_twitter" value="<?php echo (isset($_COOKIE['author_twitter' . COOKIEHASH]) ? $_COOKIE['author_twitter' . COOKIEHASH] : '' );?>" size="15" tabindex="4" />
    <label for="url"><small>Twitter Username</small></label></p>

Important : Don’t give your avatar size more than 90 pixel because this plugin can only work under 90 pixel image size avatar.

Well that’s it. You may find out a Twitter Avatar option in your dashboard, you can give some value there but I will recommend give the avatar size in your css style file.

Popularity: 100% [?]

Related post

About the Author

Evan Shajed is a freelance website Developer from London UK. Creative designer working with small business with SME DEVELOPERS Follow his daily activities on: Twitter or Connect with his community on: Facebook

Spread The Love, Share Our Article

Related Posts

There are no related posts on this entry.

Comments

  1. Evan Shajed Nov 25, 2009

    Hey I am using the plugin posted above here …. try and leave your comments….

  2. Attili Sattibabu Dec 3, 2009

    Good post mate!! Keep ‘em flowing!

  3. Pintheinfo Dec 6, 2009

    hey hmmm just passed by consedince while for some articles for my freakin college :) okay anyway nice blog Will check it out Later on ,hope you accept me as a follower. oh yeah will try to visit again :P thanks ^^

  4. Evan Shajed Dec 7, 2009

    Hey thanks for following … It is inded a very new blog…. I will try to post often very soon…

  5. Athanias Salam Dec 13, 2009

    Thank You for sharing your knowledge, Really nice post

  6. Marcus Feb 9, 2010

    I usually do not leave comments, but I thought this was a great post! WoW:)

  7. Pearlie Jackosn Feb 15, 2010

    Awesome entry I just Love it, Keep adding more Watch Old Movies like this!

  8. Eleonore Billig Feb 19, 2010

    Brilliant post here!! Poor coconut oil… Its only fault is coconuts cultivate only in the tropics. If only the coconut palm tree (Cocos nucifera Linn) grew all around us, coconut oil would have been unquestionably praised as the most splendid, most significant, best, etc. nutritional oil or fat on the entire globe. Cheers. Learn more on coconut at well-informed-sources dot com.

  9. Kenny Nasir Mar 4, 2010

    Hi, I am browsing the Internet for Valentine day ideas and came across your site. good work.

  10. Shante Mannon Mar 6, 2010

    Exactly, what i was looking for. thx

  11. Discovering how to get more followers on twitter is relatively simple. By having updated content every day, you have the ability to attract loyal followers.

  12. gold Mar 13, 2010

    Sehr interessant. Kommt hier noch ein weiterer Beitrag? Würde gern einiges mehr darüber wissen. Kannst du mir per Mail antworten?

  13. Photostudio Köpenick Mar 14, 2010

    Hey! I have been following your blog for 4 days now and i should say i am starting to like your articles.I guess im subscribing now for not missing anything new.

  14. Draco Mar 14, 2010

    Work?

  15. Allen Savarino Mar 16, 2010

    You know, I have to tell you, I truly savor this webpage and the great insight. I find it to be refreshing and quite informative. I wish there were more blogs like it. Anyway, I felt it was about time I posted a comment on Display Twitter profile picture on wordpress comments | I AM WEBSITE DEVELOPER – I just wanna say that you did a nice job on this. Cheers dude!

  16. Email Database Mar 22, 2010

    I will try it..

  17. tweet adder discount Apr 2, 2010

    An important part of generating Followers is keeping them. Getting Followers is important, however keeping the followers still is even more crucial.

  18. Jeffrey Williams Apr 8, 2010

    thank you for your post. Thats what im looking for.

  19. LearnDrumsInfo Apr 15, 2010

    hi-ya, great post.

  20. parking signs May 3, 2010

    Nice information that you share on this article. I like to thank you for posting this great article. Good information.

  21. yoga poses May 22, 2010

    Great article! I was looking for something entirely different when I came across your blog. I really enjoyed the thought you put into this writting. i will bookmark to return later.

  22. soegemaskineoptimering Jun 12, 2010

    Hey, I think your blog is very interesting. I found it via Google. Will bookmark and come back soon

  23. Mitchell Okerblom Jun 15, 2010

    thank you for this blog.

Trackbacks

  1. IM Website Developer
  2. Shajed Evan
  3. Shajed Evan
  4. yamasas
  5. Display Twitter profile picture on wordpress comments | WordPress News
  6. IM Website Developer
  7. Shajed Evan
  8. Shajed Evan
  9. News Buzz
  10. Shajed Evan