• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • The Famous Blog
    • Blogging
    • Social Media
    • SEO
    • Marketing
    • Design

Famous Bloggers

How To Blog and Start a Business

  • Contribute
    • Submit News
  • Login

Home » The Famous Blog » Linkify Twitter usernames Anywhere in Thesis Theme TwitterLink Comments

Linkify Twitter usernames Anywhere in Thesis Theme TwitterLink Comments

April 27, 2010 - Last Modified: February 14, 2013 by Hesham Zebida 1,879

Take Twitter Anywhere on your blog

Talking about Social Media is actually more exciting than any other topic, maybe because the huge amount of development in this industry which always inspire me to write new posts when ever I try something new like adding the Auto-linkification of Twitter usernames in comments section of Thesis Theme where I am using TwitterLink Comments plugin.

WOW! It’s kind of complicated to deal with those 3 big monsters together in the same working area, Thesis Theme, TwitterLink Comments plugin, and Twitter, but it’s really not that complicated process if you follow the instructions and steps in this post, and this is what I am going to show you, so scroll down to the comment section and put your mouse arrow over any of the Twitter links to see it working live on any post on our blog, man I never get bored working on enhance the blog comment section 🙂

I think I am more into testing new stuff and write about them, so… I am trying not to take it personal now, and it’s not a must for me or you to use my tips, codes or plugins I am using on this blog, I am thinking about it like giving our readers and visitors new cool techniques and extra tips that they can implement it into their blogs to enhance user experience, and the good thing here is all delivered tips & tricks are tested on our blog, so we will not talk about stuff we don’t know about, we will only give you a tested and guaranteed tips!

The idea of Twitter @Anywhere

Let me give you a very fast about Twitter @Anywhere from it’s official page:

Twitter @Anywhere is an easy-to-deploy solution for bringing the Twitter communication platform to your site. @Anywhere promotes a more engaged user base for your site. Use @Anywhere to add Follow Buttons, Hovercards, linkify Twitter usernames, and build deeper integrations with “Connect to Twitter.”

take-twitter-anywhere

Let’s Bring Twitter to our Blogs

Here is the steps in short to make sure we are not missing something:

  1. Install TwitterLink Comments plugin
  2. Add TwitterLink Comments field to Thesis 1.7
  3. Register a new application and get an API
  4. Add the needed JavaScript to Thesis Theme
  5. Add a class to TwitterLink Comments plugin

So, let’s start rocking…

1- Install TwitterLink Comments plugin

This is actually a must have plugin for any blog owner who are active on Twitter and love to engage with your blog readers and get to know what they are tweeting about in a very fast and simple way, and it’s a great plugin created by Andy the creator of CommentLuv plugin! (thanks you Andy)

Get the TwitterLink Comments plugin and install it on your blog, you can use the plugin default configurations to automatically insert the TwitterLink Comments field under your comment box, but if you are like me, so probably you will hate the blue box and you will prefer to have a nice field in your comment form, to do that you will have to insert the code manually in your comment.php. There is so many tutorials talks about that, just search for it.

2- Add TwitterLink Comments field to Thesis 1.7 comments

If you are using Thesis Theme version 1.6 then probably you will have to do this step, but mostly you have upgraded to Thesis 1.7 already, so you will lose your TwitterLink Comments field regarding the shift Thesis Developers have done to the comment.php file that gives you more control to order your comments, trackbacks and comment box, but this caused some plugins not to work with Thesis 1.7 anymore, so follow this post to know how to display TwitterLink Comments field in Thesis 1.7, I am sure it will help.

3- Register a new Application and get an API

The first thing you need is a registered client application with Twitter to create a new application for @Anywhere to get an API, I have read this at WP Beginner when I fist started to search How to add Anywhere to WordPress, but it was not working for the same way I exactly want it, there were something missing, and I still can not make it work in the Twitter ID that shows in comments section, anyways I discovered it when I read the official @Anywhere developers page instruction, and it’s what I am explaining in the step #4, I also discovered that there is lots you can do if you play with it! so try to follow what’s on these two images below:

Register a new Application and get an API

After you save your setting, you then can edit your application to configure it if needed, it should looke at the end like this:

Register a new Application and get an API
End & Save your Application configurations

Now you have an API, you will use it to make the script work for you.

4- Add the needed JavaScript to Thesis Theme

There are a few nice features you can use to configure the way @Anywhere works, of course it can work on any HTML page, but here we are talking about WordPress, and to be more specific we are talking about how to add this feature to our Thesis Theme blog. probably you know how to insert scripts in Thesis options page, it’s very easy, just go to Thesis Site Options in your WordPress dashboard, copy & past this code into the additional scripts box, this will add the @Anywhere JavaScript resource to the head of your site wide blog:

<script src="https://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1" type="text/javascript"> </script>

Dont forget to change the “YOUR_API_KEY” with your API Key, things should look like this:

Adding script to Thesis Ste Options

Now, Let’s start to call the method, but first you should know that there is much more than we are using here, so make sure to read what else you can do with @Anywhere, in our case we will use the code that makes a call to the anywhere method to display Hovercards, so… to call a method I think the best place for the script is in the Stats Software/Scripts box in Thesis Site Options page, this will call the method at the very end of the page to insure loading the whole page first, so this will not effect the page loads (put in mind that you can call more than one method by following the same way), we will do that simply by copy & past this code:

<script type="text/javascript">
twttr.anywhere(function (T) {
T.hovercards();
T("#main-content a.my-tweep").hovercards({
username: function(node) {
return node.title;
}
});
});
</script>

It’s should look like this:

adding scripts to Thesis Theme

After adding the scripts, Don’t forget to hit the green button, they call it the Big Ass Save Button 😉

5- Add a class to TwitterLink Comments plugin

This is what TwitterLink Comments plugin is missing, there is no class in the anchor element of the Twitter username link, and to make this work we must add this class to display the Auto-Link all Twitter usernames in comments and linkify the usernames, so we are going to use the default class that is used by @Anywhere wich is “twitter-anywhere-user” to look like this:

<a class='twitter-anywhere-user'></a>

To do that we will go to the Twitter ID plugin folder located where we have installed the plugin at wp-content/plugins/twitterlink-comments/ and edit the twitterlink-comments.php file to add the class to it around the line 489 in the code, and here is an image to help you make the changes (the class we have added is marked with blue in line 489):

twitter id code
The class we have added is marked with blue in line 489

That’s it save the file, refresh your browser, and enjoy with your blog readers and visitors  the new feature!

Bonus Tip for Blog Posts

It’s easy to Linkify Twitter usernames in your posts as well when ever you want to, just add any Twitter username starting with @ in the beginning of username with OUT linking to it, the script will find it and linkify automatically, and… It will shine like this @famousbloggers just remember to write the username exactly the way it is in the URL!

Talking about upgrading Twitter ID plugin

This is a suggesting for Andy of TwitterLink Comments plugin and the amazing @CommentLuv, maybe he can implement the class feature to his plugin, and by this way he can make his plungin integrated with @Anywhere, I know he is a busy guy like most of us, but it’s a nice simple add to a great plugin, although it’s not a must 😉

Conclusion

Now you got the full picture, and this tip actually will work for any theme, any blog and even any site, so make sure you read the start page for better understanding to what else you can do with @Anywhere, it’s amazing!

Linkifying Twitter usernames in comments will help me as a blog owner to follow people who comment on my blog if I like what they are saying with out leaving my blog, and it will make it easy for readers and blog visitors to reach our commentators easily and engage with them on Twitter.

Share your Thoughts about @Anywhere

While this post is about Twitter, WordPress, Thesis Theme, TwitterLink Comments plugin, why not Shoot it hard to Twitter? share it with your friends so we can hear what they think about it!

Plz, Share your thoughts and tell me how you find this feature and if you think it’s nice to have it on our blog, and maybe you would like to implement it to your blog, so if you need help.. just ask!

ShareTweet

Filed Under: Social Media, Wordpress

About Hesham Zebida

Follow @hishaman

I create websites with WordPress, and I develop Schema Plugins to help SEOs. I am a social network lover. I am also the night creature who works hard to keep this project up. Owner and founder of the Famous Blog.

Reader Interactions

Related Posts

  • schema-premium-pluginSchema Premium plugin has been released
  • Start new blog post10 Techniques how to Start a Blog Post to Engage Readers to Stay on Page
  • WooCommerce Product ReviewsWooCommerce Reviews Discount: 20% Off Ultimate License & 50% Off Everything
  • Marketing WordPress Site14 Tips To Help You In Marketing Your WordPress Site

{ 52 Responses }

  1. Kavita says:
    Hi Hesham, I am using both twitterlink and @anywhere twitter plugins and they are simply great to get twitter followers for yourself as well as for your blog commenters. I had to use @anywhere plugin as I did not know how to add su.pr short link for the permalink in tweet box by just adding code without using the plugin. Anyway I am happy. Thanks for the share. Another informative post from you
  2. Kavita says:
    Yes, Twitter is one of the popular social bookmarking tools essential for blogs and hence today I added the Twitter link plugin. Both blog and twitter will get traffic.
  3. Colin says:
    Really interesting. I have twitter embedded into my blogs but I had no idea about TwitterLink. Ultimately though, I find Twitter to be a bit frustrating because I can't seem to get much tranction with it. No one seems to want to follow me or tweet me! Do you have any tips for that?
    • Hesham says:
      My advice is .. follow people in your niche!
  4. umar kashmiri says:
    I have a question. Can we save the user infinite session keys (oAuthtoken + oauth secret) for future purpose through @anywhere javascript api? Please reply me as soon as possible.... Thanks, Umar kashmiri
  5. Isabel Rodrigues - Pro Blogger Journey says:
    Three Cheers to You Hesham. This is so helpful .-= NEW from Isabel Rodrigues - Pro Blogger Journey´s last blog ..How To Use Checklists To Make Wonderful Blogs =-.
  6. Benito says:
    dude, awesome post. I successfully got my comment forms working with Twitter Anywhere's hovercard working great. One problem though... I'm trying to get that hovercard working on the static twitter link in my website footer. No matter what I do i can seem to get it to work. I keep getting this error: "Sorry, this does not appear to be an active Twitter account" Any idea why? I've tried adding the Javascript code from twitter anywhere to the Thesis specific homepage javascript area with no luck. I'm at a total loss. What do you think? .-= NEW from Benito´s last blog ..Going Back In Time : The Virgin Taste =-.
    • Hesham says:
      The script scan the page trying to find the @ and check if there is a Twitter username match then it will linkify it! In your case I see that you are using an image, and this is why it's will not work! I personally wanted to linkify the Twitter counter on the header of my blog but also number will not work! it has to written as a text that say the ID itself like "@FamousBloggers", also you can add any Twitter id by the same way anywhere on your pages or posts, note that you don't have to link it manually!
      • Benito says:
        That is fantastically interesting. Thank you for the reply! You rock dude.
        • Hesham says:
          You are welcome buddy, I love question especially when I have answer ;) enjoy ... and have a great week end
  7. Andy Bailey says:
    another great tutorial! In fact, I have already added the class function to the plugin so it is compatible with twitter anywhere. I'll get it updated on the codex today. .-= NEW from Andy Bailey´s last blog ..Thrilled to Be the New CommentLuv Editor =-.
    • Hesham says:
      Thanks buddy, this will make it more easy now.. one step is not needed! I update this post latter as well!
  8. Dennis Edell says:
    Non-Thesis too? .-= NEW from Dennis Edell @ Direct Sales Marketing´s last blog ..Blog Subscriptions – Methods to my Madness part 2 of 2 =-.
    • Hesham says:
      Yes, this works for any HTML page, it's even easier to implemented on other WordPress theme -non Thesis- just read the documentation (how o start) page and it's well explained!
      • Dennis Edell says:
        Excellent, thanks man. :) .-= NEW from Dennis Edell @ Direct Sales Marketing´s last blog ..What are YOUR Top 3 Social Sharing Recommendations =-.
  9. Onibalusi Bamidele says:
    Wow! This is a great tutorial, I never thought this can be done. Thanks a lot for the great post, Onibalusi .-= NEW from Onibalusi Bamidele´s last blog ..7 days challenge – how it went =-.
    • Hesham says:
      Well... nothing is impossible lol
  10. benwaynet says:
    I currently use Disqus on my sites for comments. I'm starting to rethink my decision for using a hosted comment system. The idea of a sign log on (diqus,twitter,facebook) to leave comments seems good. But I've had people complain about need an account (even one they already had) to leave a comment. Please right now commentluv doesn't work with disqus. Something I'll have to think about, switching comments again :) .-= NEW from benwaynet´s last blog ..Wordpress plugins you never knew you needed. =-.
    • Hesham says:
      I my self don't prefer Disqus on blogs, specially because comments are not hosted on my own server, I don't like the idea of hosting anything out of my hands! CommentLuv is not working with Disqus because there is a major issue makes it kind of impossible to do the integration between them, I am not a ware of it technically but I know this from Andy -creator of CommentLuv- when he was talking about it somewhere on his site! My friend Sire has a very nice post titled "Is Disqus Costing You Comments? ", I thought you may like to check it out, it has some useful opinions about Disqus, maybe this will help you decide! Thanks for stepping by
      • benwaynet says:
        Thanks, I'll check out your friends post. I know CommentLuv integrates with Intense Debate, but I don't think Disqus has the same API's as ID. .-= NEW from benwaynet´s last blog ..Music Monday – Praise you in this storm =-.
        • Hesham says:
          You know better ;)
  11. Aj says:
    This is a nice plugin, it definitely helps encourage discussion...and wow, sooo many options. Great work. .-= NEW from Aj@Top Wordpress Themes´s last blog ..Stockphoto Shop Wordpress Theme =-.
    • Hesham says:
      I am always wondering why I don't implement plugins inside WP themes, but going this way will make me lose plugins updates ;) The TwitterLink plugin is a mazing and it's kind of popular now, lots of bloggers are running it now! enjoy my friend :)
  12. DiTesco says:
    Nice. Will so many features, I have to admit that I am reaching that point on not knowing which one to use and which not to use. This is a good one a I will most likely give it a try. Keep them coming Hesham. .-= NEW from DiTesco´s last blog ..Google Releases Best SEO Tips Ever =-.
    • Hesham says:
      The more options & features we discover, the more blog post ideas are generated! It's going to be fun seeing you guys implementing the @Anywhere on your blogs ;)
  13. Suzanne Franco says:
    OMgosh! I want this on my blog ... I am a total technophobe so even with this amazing tutorial I'm hesitant LOL ... it's early in the morning ... maybe I'll re-read it after my workout and shower when I'm more awake (Hesham - I'll let you know if I get it up and running). *huGs* Suzanne .-= NEW from Suzanne Franco@Money Making Ideas´s last blog ..Are You Sexy? We’re About to Find Out! =-.
    • Hesham says:
      Perfect, I would love to see it running on your blog Suzanne, let me know if you need any help! ;)
  14. Omer Greenwald says:
    Even though I don't use Thesis theme, I read a lot of posts that present it as a powerful and effective theme for SEO. I'm seriously considering it. Regarding twitter anywhere, it can be a real comment booster since twitter is really powerful for commentators promotion. .-= NEW from Omer Greenwald´s last blog ..CSS Sprites – What, Why, How and When? =-.
    • Hesham says:
      The most thing that people don't understand about Thesis Theme is it doesn't work out of the box like they say, you have to do so work to customize it or then you will have a blog looks like so many others, I am working these days on a new project to bring some nice stuff for Thesis and try to make it more beautiful, and save time working on it, hopefully I can bring this to light soon, so stay tuned ;) Thanks Omer for your comment here and on BE as well!
      • Omer Greenwald says:
        No problem, Hesham. I will keep that in mind when I start working with Thesis .-= NEW from Omer Greenwald´s last blog ..Posts Closed to Comments are Now Reopened =-.
  15. Mars Dorian says:
    Hesham, that is frickin' awesome !! Where do you get the time to find this stuff ? I've recently become a Twitter addict, and this feature sounds brilliant. I'm going to implement it now - if the plugin doesn't overblow my memory. Thank God I use Thesis ! .-= NEW from Mars Dorian´s last blog ..How to Bring Down the Sky ! =-.
    • Hesham says:
      Twitter Wins buddy, Thesis will make it more easier as you can add the script from your dashboard! let me know if you need any help!
  16. Faizal says:
    Lovely, hope Blogger have this too .-= NEW from Faizal´s last blog ..Awasi anak anda. Jangan sampai kena tembak! =-.
    • Hesham says:
      I am sorry if I can not help with Blogger, I work only with WordPress! but I am sure there as a way to do it through the Blogger template!
  17. 113Tidbits says:
    Great post for all of the functionality and resources for using this tool. However, I usually putz these types of things up and will stick with the basic twitter commenting plugin for ID. .-= NEW from 113Tidbits´s last blog ..Cowards Of Hate Are Angry Anonymous Liberal Types =-.
    • Hesham says:
      The defaults are great choice, less headaches, and working just great, for me this is a great way to write a nice useful blog post for those who are looking for it ;) Thank you Tony for stepping by!
  18. mark says:
    Hi Hesham - It looks like a pretty good tool. I was concerned that it would look like those terrible ads that are linked into keywords in a few blogs (not too many any more). But this does not take away anything from the reader's experience IMO. Have a good night! .-= NEW from mark´s last blog ..When Is Doing Something Well Not Enough? Now. =-.
    • Hesham says:
      Hey Mark, it's a very nice feature to have here, at least for me, now I can follow people who comment on this blog with one click and with out leaving the blog! It's also looks great because it's colors is going 100% with the blog theme ;) Thanks buddy for the nice visit, and have a great night!
  19. element321 says:
    Great write up as always. I will have to check TwitterLink comments. It looks like a good tool to use. .-= NEW from element321´s last blog ..Beginning jQuery Tutorial Links – Daily Delicious links April 22, 2010 =-.
    • Hesham says:
      It's wonderful James, and now on your Twitter link I can view your Twitter Hovercard, follow and or maybe unfollow you to LOL! just kidding;)
  20. Ileane says:
    Hey Hesham, thanks for letting me know about the TwitterLink Comments plugin, and I had no idea that Andy from CommentLuv had anything to do with it. I'm sure this will be widely used now that you are spreading the word. This is much needed information. .-= NEW from Ileane | The Podcast Blog´s last blog ..HootSuite’s Ow.ly Shortener Just Got Better =-.
    • Hesham says:
      I's a very nice feature from Twitter, now we are able to display the Hovercards just like on Twitter site! Andy's plugin is the one that inserts Twitter usernames in comments, and it's cool because it helps to use the @Anywhere after adding a small modification, I would love to see the plugin complete with a class, this will make it much easier to integrate this feature into Andy's plugin.. and the fun will start ;)

Primary Sidebar

Our Newsletter

Our Newsletter

Join our mailing list to receive the latest news and updates from our blog.

You have Successfully Subscribed!

Popular Articles

  1. Top 10 Sites Where You Can Get Paid to Write 115,651 views
  2. How to Get Targeted Twitter Followers Fast 92,036 views
  3. How to Set Half Rating Scale 1-5 (Poor to Excellent) by Words 86,811 views
  4. 66 Awesome Social Media Quotes 78,368 views
  5. 50 Traffic Sources You Should Milk Like Crazy 75,081 views
Schema Structured Data for wordPress
  • Blog
  • Contribute
  • About Us
  • Contact Us
  • Disclosure Policy

Copyright ©2020 · FamousBloggers - All Rights Are Reserved · Powered by Genesis Framework

  • Login
Forgot Password?
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
Go to mobile version