Thread Starter
jtimar
(@jtimar)
Well, I gave up a night of sleep and managed to hack it together myself, minus the adding a locally hosted image to just the author comments, so gravtars are now in effect.
Still wold be curious if it is possible to do what I suggested though.
If you check the source code of the comments, you should see that there’s a bypostauthor class added to post author comments only. So, in theory, you could hide non-author images via CSS using something like:
#commentlist img {display:none}
#commentlist .bypostauthor img {display:inline;}
Thread Starter
jtimar
(@jtimar)
Thanks esmi,
So obvious, and yet never thought of it.
The actually issue I had though was more that I wanted to avoid using gravatar and keep my image local, and didn’t see a way to do that with the new comment loop.
(@jtimar)
16 years, 8 months ago
Okay, after trying to twist my mind around the new way comments work in WP 2.7+ (yeah, I just discovered they had changed now, I’m late), I’ve decided to ask for help.
Basically, I am pretty comfortable with CSS and HTML, but PHP is a bit beyond me. If it’s well commented I can usually decipher what it does, but in this case it’s just too much to wrap my brain around. My goal is simply to upgrade my theme to present standards.
My theme is totally unique, I built it starting two years ago using a very simple theme as a base, and customized it greatly. Right now I have been busy cleaning out the code, and removing as much “hacked” markup from the theme and into the CSS as possible. Most of my theme’s code is very clean and as simple as possible, as I am almost obsessive about minimalism in this regard, so I have succeeded with every section except comments.php. This page features some heavy modifications and more complex PHP that I added in a copy and paste fashion but just barely understand. I just don’t know translate what I have into the newer way of doing things.
My main concern is how to keep my avatar image that appears in the author comments only. I really don’t want to open up avatars for every user. I don’t know how to achieve this using just the CSS hooks, and I don’t really want to have to use gravatar just for this.
Here is my present comments.php
And here is the relevent portion of my style.css
This is what it looks like in action:
http://inthelimelight.net/2009/03/04/the-greyhound-psychopathic-killer-is-going-to-walk-free/
So how can I translate this mess into the clean and simple code available in wp2.7+ without losing my locally hosted, admin only, avatar