-
Article
-
stephen
-
Marco
-
stephen
Similar Posts
Visitors to this post also read
Categories
- Around The Web (76)
- Cinema/DVD/TV (21)
- Firefox/Thunderbird (27)
- Fun Stuff (44)
- Gaming Stuff (12)
- Miscellaneous Stuff (55)
- Music Stuff (33)
- News Stuff (12)
- Personal Stuff (55)
- WordPress Stuff (126)
Archives
- July 2010 (4)
- June 2010 (4)
- May 2010 (2)
- April 2010 (1)
- March 2010 (1)
- September 2009 (1)
- July 2009 (1)
- June 2009 (2)
- May 2009 (1)
- April 2009 (1)
- March 2009 (2)
- February 2009 (2)
- January 2009 (8)
- December 2008 (10)
- November 2008 (9)
- October 2008 (9)
Recent Comments (including Ping-/Trackbacks)
- Dominic Allkins on How To Add Ping-/Trackbacks When Using Disqus
"MarcoThanks a load... I've just started the blog and have had a coup…" - Dominic Allkins on Disqus, Changed Comments And Facebook Connect
"Hi MarcoI had exactly the same problem with the API key and ended up wit…" - ba on How To Add Ping-/Trackbacks When Using Disqus
"Thanks man :)…" - Marco on How To Add Ping-/Trackbacks When Using Disqus
"Sorry, my bad. The function DisplayPingTrackbacks() actually goes into …" - tucsonvelo on How To Add Ping-/Trackbacks When Using Disqus
"So you added the first bit of code to the single.php, but where did you put the …"
How To Highlight A Comment From The Author
May 17th, 2007 | View Comments
I have seen many blogs where the author’s comments are shown in a specific way. This makes sense if you – as the author – are answering specific questions. I have seen this on many plugin sites. Marking your comments makes it easier for your visitors to see important answers.
Inspired by the “Author Highlight” plugin for wordpress, I put some simple code into the loop of my comments.php which shows a “This is a comment by the weblog author” note below the date and time of the post:
<?php if(strcasecmp($comment->comment_author_email, 'youraddress@yourhost') == 0) { echo "<span style='color:blue; font-weight:bold'>This is a comment from the weblog author.</span>"; } ?>[Update from 2008-06-24]
Matt Cutts actually describes a nicer different method by identifying the author’s ID in this post. [Update] That only works if you are logged in while commenting – otherwise, the user_id is “0″ and the highlighting won’t show.
Filed under: WordPress Stuff · Tags: comments, plugin, wordpress