How to Integrate Twitter into WordPress Comments?

Twitter has become a part of my life now. It has transformed from a plain old ‘what am I doing?’ status updates to my hub of everyday activities. Sort of my personal portal to the Internet, if you will.

I use Twitter

  • to network with fellow bloggers
  • find up-to-date information on breaking news
  • to follow interesting personalities & draw inspiration/motivation from them (like my buddy @MattJabs)
  • share the tons of interesting links I come across that will take too much time to blog about
  • keep myself up to date with certain interests without flooding my feed reader
  • and sometimes just to have fun

With the recent blog re-design, I also wanted to find my readers on Twitter. Some of you I follow and converse on Twitter might have found me though this blog. But, I am sure there are still a lot of you I probably don’t know or interact on Twitter.

That’s why I fell in love with this WordPress plugin – WP-Twitip-ID that let me integrate Twitter into the Comments section.

When you leave a comment here, you can also enter your Twitter ID and it will show up like this. I am going to be able to see that and follow you. So can the other readers.

wp-twitter

Let’s see how to do this quickly.

Integrate Twitter ID into WordPress Comments

  • Grab and install the WP-Twitip-ID WordPress Plugin
  • Activate the WP-Twitip-ID plugin
  • Go to the plugin Settings page
  • Set where you want the Twitter ID field to appear. It defaults to after the url field and it is usually fine.
  • Now edit your comments.php file to add the code where you want the Twitter ID to appear in the comments.

WP-Twitip-ID can automatically insert the Twitter field in the comment form for you through Javascript. But, it didn’t work too well for me so I just added the field manually to the comment form in comments.php.

How I did it?

I opened up my comments.php and to add the Twitter ID field in the comment form, I added a line similar to the url field with the appropriate values after the line which displays the url field in the comment form.

wp-twitip-code1

Next, I found out where the date is displayed in the comment loop and added a line next to it to display the Twitter id.

wp-twitip-code2

If the styles don’t appear right, just make sure you are using the same class as your other input fields.

This is just a quick overview. You can get the various options, variables & juicy details here at the WP-Twitip-ID plugin page.

Download WP-Twitip-ID

Explore Tags: , , , , , ,

21 Responses to “How to Integrate Twitter into WordPress Comments?”

  1. Mark Sierra at MeAndMyDrum.com February 26, 2009 at 7:20 pm #

    Hi K! I like the new design. And this is a pretty cool plugin that I’ll be looking into.

  2. K February 26, 2009 at 8:56 pm #

    Mark, thanks a lot man! It really is a great plugin to have and would love to see it in more blogs including yours. :-)

  3. DebtFREEk February 27, 2009 at 6:52 pm #

    Too kind K, far too kind of you to mention me! Thank you my friend.

    FYI, I just installed the plugin. I’m glad you’re staying on top of all this stuff, cuz now I don’t have to! he he.

    DebtFREEk!

  4. Madhur Kapoor February 28, 2009 at 3:44 pm #

    lol at first i was a bit surprised to see my pic but then saw the title and understood everything. Nicely explained.

  5. John Murray February 28, 2009 at 8:30 pm #

    Very nice plug in. I cannot wait to start playing with it.

  6. K March 1, 2009 at 5:04 pm #

    Anytime Matt. Glad you have it installed as well.. it’ll be great to see it on more blogs. :-)

    Madhur, glad you liked the surprise. :-)

  7. Josh March 1, 2009 at 6:17 pm #

    Woot Woot! Thanks man, I do believe I’m gonna incorporate this into my site now!

  8. K March 1, 2009 at 6:33 pm #

    Josh, you are welcome.. would love to see it on your site as well!

    Between folks, Josh is the brain behind the Sexy Bookmarks plugin I love and use it here.

  9. unoblogger March 3, 2009 at 2:29 am #

    This is a plugin I’ve been wanting to install into my blog…. for the very reason you’ve stated on this post… thanks….

  10. Tim Fehlman March 3, 2009 at 11:39 am #

    Very nice new template and the Twitter integration is a very nice touch!

    Tim

  11. K March 3, 2009 at 11:59 am #

    unoblogger, you are welcome!

    Tim, thanks a lot. I think this will be a norm in most blogs soon or atleast I hope it will be. :-p

  12. Justin June 22, 2009 at 3:05 pm #

    Are you using this with wordpress 2.7? I have this for my comment loop:

    48, )); ?>

    How/where do I add in the line of code to show the twitter id?

    Justins last blog post..Using the ShareThis Button To Be More Productive

  13. Joni July 9, 2009 at 11:52 pm #

    Help! I have WordPress 2.8 and the Flexibility2 theme. I would like to add the WP-Twitip ID. But I cannot figure out where to put the code in the in the comments.php file. I have read and read and I have even watched a video online, but the text they are asking me to find is not in my comments.php file.

    I do NOT have the text “date” or “foreach” in my comments.php file.

    I watched this video, but it not for wordpress 2.8:

    Add a twitter username field to a wordpress comment form and …
    4 min 57 sec – Nov 22, 2008 –
    how to install and use the WP-Twitip-ID plugin for WordPress 2.6+ blogs Add an extra filed to the wordpress comment form for a users twitter id and …
    http://video.google.com/videoplay?docid=-5246679886798480797

    Can you please help me?
    .-= Joni´s last blog ..Manure Management and Composting Programs =-.

  14. kiruba July 16, 2009 at 8:58 am #

    Very useful.Many more thanks.

  15. kiruba July 16, 2009 at 9:00 am #

    I am integrating twitter and wordpress.

  16. Wayne July 20, 2009 at 11:42 am #

    Yup, my next project right here…awesome of you for sharing this!
    .-= Wayne´s last blog ..A Non-Intrusive Way To Integrate Twitter With Your Blog =-.

  17. K July 20, 2009 at 1:38 pm #

    You are welcome, Wayne! Thanks for sharing your Twitter integration insight. I am going to work on that soon!

  18. Aidil Sharizaq July 22, 2009 at 2:26 pm #

    thanks for the info.Im goin to try out this plugin now for my blog!
    .-= Aidil Sharizaq´s last blog ..10 Topic Openers You Can Use To Start a Conversation With a Girl =-.

  19. shibuya246 July 25, 2009 at 10:25 am #

    If you are using WP 2.8 you will need to sidestep the new “comments loop” that WP has implemented. Check in the functions.php file if your theme is using customised comments. It will probably be towards the end of the functions.php page

    Also, you will probably find a line in your comments.php page like this

    CODE GOT DELETED FOR SOME REASON

    the “mytheme_comment” reference will be the name of the function in your functions.php page. That function will be called in place of the loop and that function will have the html code where you need to then put in the extra code for TwitterID to show up.

    Took me a while to find this, but it finally works. If you have problems with this explanation let me know and I can explain better maybe.
    .-= shibuya246´s last blog ..Chiba Monorail =-.

  20. Sandra September 3, 2009 at 6:11 pm #

    Does it really offer such a big added value to a blog if you have Twitter comments integrated in your blog?
    .-= Sandra´s last blog ..Hypothekendarlehen Rechner =-.

Trackbacks/Pingbacks

  1. Top & Best 65+ WordPress Plugins | ShanKri-la - February 26, 2009

    [...] – Integrate Twitter into WordPress comments and discover your readers in [...]

Leave a Reply