
Lately, I’ve been working in some small details in my blog - as some of you might have noticed. This time, I just wanted to post a quick tutorial about how to customize your comments in your Wordpress blog.
How to Change the Style of the Author’s Comment in Wordpress
You probably have seen this before, whenever you are reading the comments of a post and you notice that the author’s comment is highlighted in a particular way, just so it’s different than the rest. Well, there are many ways to get this done.
An easy way to do it is by going to Appearances -> Edit -> style.css and add the following class:
.author_comment {
background-color: #F1C056 !important;
}
This simple class will just change the background of the author’s comment box. Here you can customize the style of your author’s box by changing the border color, etc.
Finally, you need to make a small change in comments.php, so go to Appearances -> Edit -> comments.php. Once you are in the page, look up the line
<li <?php echo $oddcomment; ?>id="comment...
Change it to this:
<li class="<?php
/* Only use the author_comment class from style.css if the user_id is 1 (admin) */
if (1 == $comment->user_id)
$oddcomment = "author_comment";
echo $oddcomment;
?>" id="comment…
That’s all, if you followed this two simple steps correctly, your author’s box should be displaying with an improved and personalized style.
How to Change the Avatars Sizes in Comments
This is really easy, the kubrick wordpress template resizes the images to 32×32 by default. In order tyo change the sizes, go to Appearances -> Edit -> comments.php and look up
<?php echo get_avatar( $comment,
You will find a line that looks like
<?php echo get_avatar( $comment, 32 ); ?>
In order to make the image bigger just try changin the number 32 to 50. That’s all.
I hope you enjoyed this small tutorial. Until next time!