WordPress.org

Ready to get started?Download WordPress

Forums

Trying to customize the comments made by the author (3 posts)

  1. envec
    Member
    Posted 7 years ago #

    I am trying to customize the comments I leave on my own blog, by calling a special division if the email left is my own, otherwise it calls the normal division. Here is the code I am using:

    <?php
    if($comment->comment_author_email == ‘myemail@mydomain.com’){ ?>
    <div class=”blogauthor”>
    <?php } else { ?>
    <div class=”normalcomment”>
    <?php } ?>

    However when i implement it I get an error on the comments saying:

    "an unexpected @ was found on the comment function"

    The error is obviously coming from the @ on the email I inserted.

    How can I solve this?

  2. Alex Cragg
    Member
    Posted 7 years ago #

    try using " " around the email address

    thats a guess by the way!

    alternatively try Author Highlight

  3. envec
    Member
    Posted 7 years ago #

    dont think its the "" marks. thanks anyway I will check the plugin

Topic Closed

This topic has been closed to new replies.

About this Topic