Comment Authority

I implemented Comment Authority. You can distinctly see a very tiny graphic next to my comments. This seems to be only effective for a single author. Plus, if anyone else enters “Bryan” as their name, I think that graphic will display as well. In any case, I’m sure it can be improved – I definitely don’t know how to do that.

Published by

Bryan Villarin

Bryan is a Community Guardian at Automattic. He's also a photographer, card magician, and cat whisperer. (Thanks to my friend and colleague Steve Blythe for the sweet photo!)

5 thoughts on “Comment Authority”

  1. You could always add more conditions in your if statement. For example,


    ((get_comment_author() == 'Your_Name') && (get_comment_author_email()=="Your_Email"))

    Let me know if I can help you further!

    Meng

    Like

  2. Thanks Meng! I tried that, and wasn’t sure if there’s a colon (:) after that. Also, was there a reason why there isn’t any spaces for the get_comment_author_email tag? I need to install a plugin to make pasting code easier, huh?

    Like

  3. That colon is needed for the if syntax. Alternatively you can do this:


    <?php if ((get_comment_author() == 'Meng')&&(get_comment_author_email()=="gaomeng@gmail.com")) { ?>
    <div class="comment-authority"></div>
    <?php } ?>

    I’m quite the php n00b so I could be wrong. But at least it works =)

    Like

Talk to me, Goose

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s