Archive

Archive for February, 2006

使WordPress评论中文章作者的评论突出

February 15th, 2006

       在
<?php $numberz = 1; foreach ($comments as $comment) : ?>
       后面添加
<?php /* Changes every other comment to a different class */
if ($comment->comment_author_email == get_the_author_email()) $oddcomment = 'alt author';
else if ('alt' == $oddcomment || 'alt author' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>

       在css中添加alt 和alt author的定义:
#commentlist li {
padding: 10px 20px 5px 5px;
border-bottom: 1px dashed #dce6ff;
}
.alt {
background-color: #fff !important;
background-image: none !important;
}
.author {
color:#fec02a;
background:#fff;
}

Notes