Posts (RSS | eMail)
Comments (RSS | eMail)
Please consider signing the Google Gmail Automatic BCC Option Petition
and spread the word. Thanks!
[click to close]

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 method by identifying the author’s ID in this post.

Have Your Say!

Next post: WordPress Plugin “GoodLinks”
Previous post: The Blog Herald - News For Bloggers

Trackback URI | Comments RSS | Permalink

del.icio.us del.icio.us eMail this post eMail Print Print
Did you like this post? NoYes
No votes yet, be the first!
Loading ... Loading ...

Comments

  1. This is
     Comment 
    #1
    stephen
    2007-11-10 @ 22:11:53 +0100 (CET) | Permalink

    You should leave a comment so we can see. ;)

  2. This is
     Comment 
    #2
    Marco
    2007-11-11 @ 11:02:58 +0100 (CET) | Permalink

    Ok, here it is. I have slightly changed the CSS, so that by now, you should see a thick border and a light yellow as background color, whereas comments from visitors have a thin border and either white or grey as background color.

  3. This is
     Comment 
    #3
    stephen
    2007-11-11 @ 17:48:18 +0100 (CET) | Permalink

    thanks dude


Have Your Say!

Your email address will not be shown to others.

back to top