Support » Themes and Templates » comment even/odd

  • I use the Kubrick template (for now) and just upgraded to 1.3a 5 from 1.2.1. Smooth transition other than, in my old template, every other comments was styled differently (i.e., had a grey background) thus making it easy to distinguish where one stopped and another started. 1.3a’5′ isn’t picking up on this change…any ideas (maybe from Ku~ users?) about changing this back?
    Also, I’d love to have comments by a certain author (mainly, [only], me) show up w/ a diff color b/g as well….
    Thanks in advance for any suggestions….

Viewing 2 replies - 1 through 2 (of 2 total)
  • hey there idowens…i upgraded to 1.5 but I think i can help.

    for me the file is comments.php (maybe for you it’s still wp-comments.php) but you’ll notice in the php code that is says something to the likes of

    $oddcomment = 'alt';


    if ('odd' == $oddcomment) $oddcomment = '';
    else $oddcomment = 'alt';

    if this (or something like it) is there then all you need to do is create a class in your stylesheet for .alt such as:

    .alt { background-color: #ccc;} now every other comment will be a different background color.

    if you want to have some more fun you can add a style for the other comments. do something like this:

    $oddcomment = 'odd';
    if ('odd' == $oddcomment) $oddcomment = 'even';
    else $oddcomment = 'odd';

    That’s what I did, and created a class for odd and a separate one for even. Hope that helps, lemme know 🙂

    whoa, just checked the date, that was a while ago wasn’t it. hehe oh well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘comment even/odd’ is closed to new replies.