• wp_list_comments applies classes to each comment, like this:
    <li class=”comment even thread-even depth-1 parent” id=”comment-2″>

    It works fine if there are only parent (and no child) comments.

    However, once a child (“reply”) comment is added, the classes are no longer correct (in my opinion) – it applies the alternating (in this case “odd”) class to the new child comment, and then the “even” class to the next parent comment, which should actually be “odd”….

    So with no child comments it looks like this for styling:

    – even
    – odd
    – even
    – odd

    But when there are child comments it does this:

    – even
    – odd
    – even
    – odd
    – even
    – odd
    – even
    – odd

    SO you can see how the styles don’t look right because the parent comments don’t keep a consistent alternating class assignment.

    In my opinion, it should work like this:

    – even
    – even
    – odd
    – odd
    – even
    – even
    – even
    – odd
    – even
    – odd

    Can anyone comment on this? Is it just me or does it seem like it should be fixed?

  • The topic ‘wp_list_comment odd/even classes wrong’ is closed to new replies.