Blogging Tips | Admin Comment Background Image

If you want to reply to your visitors who comment on your blog and you want the comment structure (or the style) to be different when you reply. Here is the answer for this wordpress tricks. The tutorial for admin comment background image.

A while ago I was looking around for how to make my own comments a different color and have a background on my blog.

The trick is simple. Pretty smart. After that, it was a simple matter of.

1. Upload your desire image name it com-author.jpg to wp-content/themes/your-theme/images/

2. Changing your theme to add an “authcomment” style

I edited style.css and near the bottom added these lines:

.authcomment {
background: url(images/com-author.jpg) no-repeat top right;
background-color: #E4F2FD !important;
}

The color of #E4F2FD you can change it to your favourite colors. The code ( top right ) in code above you can change to ( top left ) if you want your image appear on the left.

3. Then edit your comments.php file to add a little code.

The comments.php file had a line that looked like this:

<li class=”<?php echo $oddcomment; ?>” id=”comment

and I changed it to more or less look like this:

<li class=”<?php
/* Only use the authcomment class from style.css if the user_id is 1 (admin) */
if (1 == $comment->user_id)
$oddcomment = “authcomment”;
echo $oddcomment;
?>” id=”comment

That’s about it. Now I have a distinctive color and image for my own comments, so you can quickly scan a thread to see in this blog when I circle back around to leave a comment. Hope you have it too.

Make sure you edit this ( ” ) by typing yourself.

Hope you enjoy this easy blogging tips tutorial.

Ps : Try this Super Affiliate Blogger if you want to make money online.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • De.lirio.us
  • NewsVine
  • TwitThis
  • Facebook

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Related Post

2 Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment