donalyza.com

Avatar

Hello! I'm Donalyza Agaton, a Blogger who loves Web Design, a rock and r&b Audiophile, a psp Gamer, a hobbyist Photographer, an amateur Videomaker, a gadget geek Girl, and a proud Filipino.

donalyza: my bro got an EEEPC 1000H. He asked me to install Mac OSX. Hmmm, I really have no idea on how to do it but I will definitely research that. 1 day ago

How To: Style Author Comments in Wordpress

Posted in: WordPress

The other day I wrote a post on How To: Customize your own style in showing the number of comments. Today I’ll be discussing on how to highlight the author’s comments. It’s just easy to follow and I know you can do it in just a few minutes.

To start of, we are going to edit your comments.php and style.css. If you are a Wordpress user definitely you know what I’m talking about. For newbies,Here’s an easy way to access your site. go to admin panel> presentation> theme editor> then just click the you want to change.

Let’s begin.

  1. Open the comments.php within that file. Search for the code that read as

<?php foreach ($comments as $comment) : ?>
<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”

Remove the second line and change it using the code below. Don’t forget to modify the ones that are marked red.

<li class=”<?php if ($comment->comment_author == ‘TYPE AUTHOR’S NAME‘ &&
$comment->comment_author_email == ‘TYPE AUTHOR’S EMAIL ADDRESS‘) echo ‘authorcomment’;
else echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>

After you update your comments.php, we will add styles to it. Open your style.css, we are going to design the class for “authorcomment. Look on comments section and add this code.

.authorcomment {
background: #666666;
}

This code varies on how your theme was made. Analyze the code but once you understand the principle you can apply it in your theme.

Don't miss any post. Subscribe to RSS or by email now.
Tags: ,

Comments

RSS feed | Trackback URI

6 Comments »

Tuesday, September 16, 2008 at 3:34 am

Nice Photos - great post

 
Friday, October 31, 2008 at 7:40 pm

I\’l be back… :)s

 
Monday, December 29, 2008 at 11:51 pm

hello it is test. WinRAR provides the full RAR and ZIP file support, can decompress CAB, GZIP, ACE and other archive formats.
gmxmvbvuyiaxlbsxgolylsjulziwokrvwvchello

 
Insispassose
Thursday, January 1, 2009 at 3:00 am

cilfhyivnimwfhugwell, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)

 
Friday, June 26, 2009 at 9:06 am

Как раз то, что нужно, буду участвовать.

 
Thursday, July 2, 2009 at 11:04 pm

Очень понравился ваш блог! Подписался на rss. Буду регулярно читать.

 
Your Ad Here

Trackback responses to this post

Leave a Comment, Win a Friend!

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
blog stats