highlight author comments
-
Using code from scriptygoddess, I’ve gotten my comments to highlight successfully. The problem is, I have multiple authors on my blog, and I only want to highlight the comments from the person who authored the post being viewed.
Here’s what I have now:
<?php
$authorcomment = false;
if($comment->comment_author_email == '[email protected]') {
$authorcomment = ' authorcomment';
} elseif($comment->comment_author_email == '[email protected]') {
$authorcomment = ' authorcomment';
}
?>What I would like is to do something like this:
<?php
$authorcomment = false;
if($comment->comment_author_email == $post->post_author_email) {
$authorcomment = ' authorcomment';
}
?>Obviously, the $post->post_author_email bit doesn’t exist, but I’m looking for something similar that will just output the email address for the author of the post, so that I can compare it to the author of the email.
Anyone know how to do this?
- The topic ‘highlight author comments’ is closed to new replies.