Wordpress Set Apart Author Comments
Posted: Thu Aug 20, 2009 9:28 am
I am new to PHP and this one is challenging me...
I basically want to set apart author comments for my blog. There are a few methods I found by Googling one in particular I got working (somewhat)
http://aonach.com/chatter/highlight-aut ... wordpress/
As instructed I added this bit of code to the comments file:
Followed by:
However the way the comments CSS IS set up for this theme I cannot just throw in an extra class as is done here.
I pretty much have to have two completely separate classes so it would be more like this:
What I need to do is figure out how to separate author comments and everything else so I need a
and another type of "if($isByAuthor )" that defines all the other comments....
Hopefully this all makes sense.
Thanks.
I basically want to set apart author comments for my blog. There are a few methods I found by Googling one in particular I got working (somewhat)
http://aonach.com/chatter/highlight-aut ... wordpress/
As instructed I added this bit of code to the comments file:
Code: Select all
<?php
$isByAuthor = false;
if($comment->comment_author_email == get_the_author_email()) {
$isByAuthor = true;
}
?>Code: Select all
<li class="comment wrap" <?php if($isByAuthor ) { echo 'authorcomment';} ?>" id="comment-<?php comment_ID() ?>">I pretty much have to have two completely separate classes so it would be more like this:
Code: Select all
<?php if($isByAuthor ) { echo '<li class="author-comment-wrap">';} ?>"
<?php if($notsure) { echo '<li class="normal-comment-wrap">';} ?>"
Code: Select all
<?php if($isByAuthor ) { echo '<li class="author-comment-wrap">';} ?>"
Hopefully this all makes sense.
Thanks.