Changing the comments style in WordPress »
Reading a Douglas’s post about underlining text in Illustrator, I noticed how his own comments are highlighted.
Douglas uses Movable Type, so I went to WordPress forums and quickly found this article.
These are the easy steps:
Edit your comments template in WordPress and before starting the loop:
<?php foreach ($comments as $comment) { ?>
include the following:
<?php
$isByAuthor = false;
if($comment->comment_author_email == 'YOUR-EMAIL') {
$isByAuthor = true;
}
?>
then, before starting the comment text, add:
<?php if($isByAuthor ) { echo '<div class="authorcomment">';} ?>
and before closing the list element (li), include:
<?php if($isByAuthor ) { echo '</div>';} ?>
You should create a class called authorcomment in your CSS.
That’s it!
En: CSS Web | Por: Alexis | @ 9:28 pm
Comments
No comments yet.
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




