How to Add Twitter Field in the Comment Section of Thesis Theme?

by Harshad on May 9, 2009

Yesterday, I was just playing with Thesis code and found a very useful hack to add twitter field in the comment section of any WordPress theme.

If you put twitter field in the comment section of your blog then it would be easy to maintain a blogger-reader relationship, and it would also give good visibility to reader’s twitter profile.

Here’s how you can add twitter field on your blog -

twitter field

For Thesis theme:

1. Install WP Twitip ID plugin on blog.

2. Go to Control Panel.

3. Open custom_functions.php from given path.

/wp-content/themes/thesis/custom/custom_functions.php

4. Copy the following code and paste it in above file.

function custom_Twitter_ID()
{
if(function_exists(wp_twitip_id_show))
{
$atf_id= wp_twitip_id_show("return");
if($atf_id)
{
echo 'Twitter id: <a href="http://twitter.com/',$atf_id,'">@',$atf_id,'</a>';
}
}
}
add_action('thesis_hook_after_comment_meta', 'custom_Twitter_ID');

5. Save the file and open WordPress dashboard.

6. Go to Settings, open WP Twitip ID.

7. Just add an extra <br /> in HTML before Field.

8. Click on update. That’s it!

For normal themes:

1. Get a WP Twitip ID plugin and install it properly on blog.

2. After the installation, go to Theme Editor and open comments.php

3. Put the following code in comments.php

<?php if(function_exists(wp_twitip_id_show)) { wp_twitip_id_show("auto"); }?>

4.  Save the file and check your comment section.

I hope you will try this hack in your Thesis theme. If you find any difficulty, just ask me and I’ll try to solve it for you. :)

Related posts:

  1. How to Remove Comments from Homepage of Thesis Theme?
  2. How to display Ads in Single Post of Thesis Theme?
  3. How to display 125 x 125 Ads in Sidebar of Thesis Theme?
  4. How to get Twitter’s Official Tweet Button for Thesis WordPress Theme?
  5. Get TweetMeme Button on Thesis WordPress Theme

{ 15 comments }

Mayur May 11, 2009 at 3:04 pm

That’s a nice hack. I’ll try it out on my blog with Thesis theme.

Harshad May 11, 2009 at 6:21 pm

Yes. You should try it on your blog.

dreamfree May 12, 2009 at 8:52 am

great plugin, it works!

Nihar May 12, 2009 at 11:04 am

Nice tutorial.

I saw similar field on Harsh blog shoutmeloud.com.

NOw i know how to add this.

BTW, when did you switch to thesis theme?

Does thesis theme also have other colors other than this black and white?

Harshad May 12, 2009 at 1:25 pm

I bought this thesis theme last month. There is no other color combination available in this theme, but you can customize it using several hacks.
Check these wonderful websites which are using customized thesis theme – http://diythemes.com/thesis/showcase/

George Serradinho May 20, 2009 at 9:50 pm

Thanks for this hack. I have not yet bought the Thesis theme, but I am thinking of this and you have made it very simple to implement twitter into the theme.

Thanks for sharing this info :)

Harshad May 20, 2009 at 11:18 pm

You’re welcome. Keep visiting for more useful hacks. :)

Kerrie June 5, 2009 at 8:53 pm

Thank you for this!

Harshad June 5, 2009 at 8:55 pm

You’re welcome. Keep visiting for more tips & tricks. :)

Dave June 26, 2009 at 6:40 pm

Any tips on how to do this with just a custom text field? I have created the key and the field in the comments form, but I can’t get it to display in the user’s comments under their meta data.

Harshad June 26, 2009 at 8:41 pm

Use twitip plugin, it will solve your problem.

Dave June 26, 2009 at 8:43 pm

I can use that plugin for something that’s not a twitter ID?

Harshad June 26, 2009 at 8:48 pm

No you can’t use that plugin for any other field.

Dave June 26, 2009 at 8:49 pm

Right, so really, using twitip WON’T solve my problem, will it?

Harshad June 26, 2009 at 8:56 pm

For customized text field, you’ll have to write a piece of code in comments.php.

I would suggest you to hire a web programmer.

Comments on this entry are closed.

blog comments powered by Disqus

Previous post:

Next post: