• Resolved rbenson

    (@rbenson)


    The otherday, I tried to upgrade but it didn’t work, and when I went back in, I saw some of my customizations were gone. One of which is if I left a commentt on a post the style should be used wou1d be authorcomment. I am getting a T_error, my code looks like:

    <?php foreach ($comments as $comment) : ?>
    <li id=”comment-<?php comment_ID() ?>”
    class=”
    <?php if (comment_author_email() == the_author_email())
    {echo ‘authorcomment’;} else {echo “commentlist-comment” <?php echo $oddcomment; ?>}?>”>

    The original code looks like:
    <?php foreach ($comments as $comment) : ?>
    <li id=”comment-<?php comment_ID() ?>” class=”commentlist-comment <?php echo $oddcomment; ?>”>

    Any hints?
    https://blog.rbenson.info/archive/1

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

    (@kafkaesqui)

    For your list tag’s ‘class’ code try:

    <li id="comment-<?php comment_ID() ?>"
    class="<?php if (get_comment_author_email() == get_the_author_email()) { echo 'authorcomment '; } else { echo 'commentlist-comment '; } echo $oddcomment; ?>">

    Thread Starter rbenson

    (@rbenson)

    That doesn’t work, it always goes to class=”commentlist-comment”. Plus those two functions aren’t listed on the template tags page.

    EDIT: Ok now it’s works

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customizing Author comments’ is closed to new replies.