Title: Need Code to Alter Comments
Last modified: August 18, 2016

---

# Need Code to Alter Comments

 *  [ccano](https://wordpress.org/support/users/ccano/)
 * (@ccano)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/need-code-to-alter-comments/)
 * I know that this code lets me alter the way my comment looks as opposed to others:
 * <?php
    $isByAuthor = false; if($comment->comment_author_email == ‘me@myemail.
   com’) { $isByAuthor = true; } ?>
 * What I’m wondering is…
 * How can I alter that code to apply to everyone EXCEPT a certain e-mail?
 * I assume it would mean altering this part of the code:
 * if($comment->comment_author_email == ‘me@myemail.com’)
 * Anyone know how to accomplish this?
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/need-code-to-alter-comments/#post-467649)
 * `if( !($comment->comment_author_email == 'me@myemail.com') ) {`
 * ! = NOT in PHP lingo. So you’re saying _if comment author’s email is NOT [me@myemail.com](https://wordpress.org/support/topic/need-code-to-alter-comments/me@myemail.com?output_format=md)_,
   do the following. This works the same:
 * `if($comment->comment_author_email != 'me@myemail.com') {`
 *  Thread Starter [ccano](https://wordpress.org/support/users/ccano/)
 * (@ccano)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/need-code-to-alter-comments/#post-467660)
 * That works. Thank you so much, I’ve been messing with the code all night trying
   to figure this out.
 * Appreciate it 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Need Code to Alter Comments’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [ccano](https://wordpress.org/support/users/ccano/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/need-code-to-alter-comments/#post-467660)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
