This WordPress Wednesdays entry is a re-post from Matthew’s old blog as we resurrect them here at GeekRev.
Today we will touch on a little trick that I have added in the last few days. This is a simple 2 minute change that I think really brings out the blog comments that much more.
Highlighting the author’s comments can really help readers easily track the author’s comments from everyone else. When readers come to a post with a ton of comments, they may want to check comments of the author first. There are some plugins that could do this job, but you know my stance on plugins over code!
So to get this working correctly in your WordPress blog, all you have to do is add the code snippet below to your style.css or for Standard Theme users, custom.css. Make sure you type this out, it will help you to learn the code rather than the easy copy and paste! This does get a little crazy with nested comments and I am working out the bugs now for it!
[CSS].commentlist li.bypostauthor, li.comment-author-admin {
background-color: #E0E0E0 !important;
}[/CSS]
You can change the style to whatever suits your theme colors. A subtle difference can go a long way!
So what do you think? Will you add it?
Good tip. I need to think of a color that would go nice with my setup but not make it muddy since I already use gray shades in my comments.
Thanks man, its a super easy way to draw a bit of attention to your comments as the author.
Heading over to your site now to see if I can offer up any help on the color scheme.
Annnnd it looks like you did it already – looks great with the white.
no, actually – my theme alternates between white and gray for the comment threading… here is a post with multi-nesting to see what I mean: http://herbhalstead.me/2010/10/08/good-morning/
#E0E0E0 looks to be a color that would fit right in and draw just a tad more attention to it.
interesting – it did not work on mine
ok, got it – not sure that color works
The fun thing about is, you could do something as simple as just adding a border of a certain color around your comments. This would be just a touch of different and would draw the eye to your comments.
Holler if you need any help!
adding now
Will be right over to check it out!!
This is something I’d like to do, but the CSS stuff makes me nervous to touch. I would like mine to stand out a little.
Send me an email brother I can help you out no problem!!
I’ll send in a bit. Thanks man.
CSS can be destructive if you’re dealing with positioning, but this is just color, man. I could talk you through it over the phone if you want.
The responses of other people after yours are in grey as well. Can you code it so only yours are grey?
Working on it now brother. It seems that the child comments don’t have a CSS class associated.
Stay tuned, I will update the post when I find a fix.
the way to do it is to set a BG for ALL comments, and let the author comments override.
Here at G4h it is setup that way. This is more than meets the eye, I am tracking it down now, BUT this is not the case for all themes. I have this working on plenty of other themes.
I figured it out with the help of a few folks from around the web!!
#comments li.comment { background-color: #F5F5F5; -moz-border-radius: 4px 4px 4px 4px; }
#comments li.odd { background-color: #F5F5F5; -moz-border-radius: 4px 4px 4px 4px; }
#comments li.even { background-color: #F5F5F5; -moz-border-radius: 4px 4px 4px 4px; }
#comments li.bypostauthor { background-color: #E0E0E0 !important; -moz-border-radius: 4px 4px 4px 4px; }
#comments .comment .comment-container {
border-bottom:1px solid #EEEEEE;
padding:10px;
}
#comments ul.children {
-moz-border-radius:4px 4px 4px 4px;
margin:10px 0 0 15px;
padding:5px;
}
This is for Standard Theme only and appears well – see above!
Very cool! I just did this on my blog and it looks a lot better! One more question… how did you get the rectangle box around “Reply”? That looks nice.
It’s all CSS, holler you need any help figuring it out!
Great tip! I’ll definitely be checking in at least every Wednesday. Nice to see you went with the Standard Theme too! :)
I added it to mine, but all replies are colored. It does not single out what I have replied with.
Methods for Unlock Iphone 4 gary the gadget guy Anyone who possesses an iPhone must are pointed out to you and will require unlock iPhone 4 h strategies, frequently regarding the particular application which can be on the other hand protect.Yet, perhaps it’s relatively irritating to uncover an individuals i personally mobile phone if you don’t find very good brand new iphone4 treatment of fasten in software.There are various for ads all around you, in spite of this, minus special comprehending you can find, entirely trapped, so several options a handful of big cash concerning very little. korvax