WordPress.org

Ready to get started?Download WordPress

Forums

comment even/odd (3 posts)

  1. idowens
    Member
    Posted 9 years ago #

    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....

  2. joeytrimmer
    Member
    Posted 9 years ago #

    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';

    and

    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 :)

  3. joeytrimmer
    Member
    Posted 9 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.