There’s a lot of magic going on around here, and not the least of which is some awesome changes I’m making to the site. More about that later.
I’ve already added in a couple of features and you’ve been curious. I share all my tips and tricks and since these are kind of lengthy, I’ll share them with you here.
Back in February of last year, I shared another kind of tricky tip for adding numbers to your comments. I still get questions about how to do that from bloggers running contests and giveaways, its a great way to add your comments to the random number generator especially if you’ve got tons of comments, like most contests do. It can save hours of headaches!
I’ve been working on adding twitter id’s to my comments and piddling with code and functions and while I was searching for something else today, I came across a WordPress plug in that does just exactly what I want it to do..with a little tweaking.. so here ya go!
First, kudo’s to Andy Bailey, the comment luv man for doing the hard lifting here..he and Darren Rowse and a few others developed the initial plug in and Andy’s now supporting the TwitterLink Comments Plug-in through the Comment Luv site. (I use that plug in too!) You need WordPress 2.81 or higher. I hope you’ve upgraded by now!
Here’s a quick screen shot to show you what the plug in does and how it looks, fresh out of the box.
Download TwitterLink Comments
(or use the plugin browser in your dashboard to search for TwitterLink-Comments)
You can see it in action down below on my comment form!
Here’s How The Plug In Works
You can let the plugin do it automatically for you along with a message that you can configure in the settings page. That message is the blue highlighted area in the screenshot there and its already coded and styled. All you need do is make some quick selections.
The field description, link position, format and action can be configured by you in the settings page including any extra html, classes and text that you might desire. Go ahead and get creative with that message, just remember to remind your commenters not to add in the http: or @ before their user name.
Out of the box in the configuration panel you have three choices of areas within your comments to locate the TwitterLink
- Under Name Link
- Start of Comment Text
- End of Comment Text
and three format options for the link.. easy peasy
Link Format Options:
- Use NoFollow on link
- Link opens in a new window
- Manual link
Now for the
Advanced User Options
I’m never , well almost never happy with a plug in out of the box and I like to do my own tweaking. So, putting on my code ninja face and my sorcer’s aprentice cap, here’s what I did to tweak the plug in for my site.
1. I hated the little blue box below my comments box. It just had no, well shall we say panache. After a little thought, I worked a little piece of code to add a field to my comment area, so that a commenter would enter their twitter id after they’d entered their name, email and blog url.
3. To use the code like I did you need to open your comments.php file in your WP Admin. (Make a copy of this file and put it someplace safe before you begin tweaking) In that file look for the code that reads something like this…
< ?php if ($req) echo ‘ aria-required=”true”‘; ?> />
(Depending on your theme, your code might be slightly different, if you need help, we’ll give you a hand. )
4. Paste the code from the first box on the next line after the final
of the code in the second box. Click Update File to save.
5. Open the Admin Panel of the TwitterLink Comments Plug in and set your preferences. ***IMPORTANT : Click NO for Add Twitter Field Automatically, you just did that by adding the above code.
Set the remainder of the preferences to your liking. Click save changes and Voila! You now have a comment form that users can enter and link their twitter user names!
Go Ahead ! Add your own comment to this post and link your twitter id right up!
The plug in doesn’t collect any data from the commenters twitter account and only uses the id to link to their twitter page.
The comment author only needs to put in their Twitter username once and every comment from them on the whole site will display a link to follow them.
Let me know what you think about this plug in and using it!
screen shots courtesy commentluv.com and Andy Bailey
** If you use Genesis Themes by Studio Press/Copy Blogger your steps will be a bit different.***