Page 1 of 1

Wordpress Set Apart Author Comments

Posted: Thu Aug 20, 2009 9:28 am
by NickB
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:

Code: Select all

<?php
$isByAuthor = false;
if($comment->comment_author_email == get_the_author_email()) {
$isByAuthor = true;
}
?>
Followed by:

Code: Select all

<li class="comment wrap" <?php if($isByAuthor ) { echo 'authorcomment';} ?>" id="comment-<?php comment_ID() ?>">
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:

Code: Select all

 
<?php if($isByAuthor ) { echo '<li class="author-comment-wrap">';} ?>"
<?php if($notsure) { echo '<li class="normal-comment-wrap">';} ?>"
 
What I need to do is figure out how to separate author comments and everything else so I need a

Code: Select all

 
<?php if($isByAuthor ) { echo '<li class="author-comment-wrap">';} ?>"
 
and another type of "if($isByAuthor )" that defines all the other comments....

Hopefully this all makes sense.

Thanks.

Re: Wordpress Set Apart Author Comments

Posted: Thu Aug 20, 2009 2:03 pm
by NickB
bump...
this is sort of urgent...
anybody please?

Re: Wordpress Set Apart Author Comments

Posted: Thu Aug 20, 2009 7:59 pm
by NickB
bump