• Problem: I want to add the div “.banner” to all comment posts by the author of the article. But when I use .bypostauthor to target the author posts, all nested replies to the author comment also gets the .banner div.

    I don’t really understand how I can target only the .bypostauthor without any nested replies being targeted.

    How would you guys solve this?

    Where would you put the <div class=”banner”></div> line?

    How would you target it with CSS to avoid nested replies to also get the div?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ad the banner (via CSS background) to .bypostauthor, then remove that background for .bypostauthor li elements.

    Thread Starter mantralux

    (@mantralux)

    Adding the banner as a background to just the .bypostauthor class is not an option in my case I’m afraid. I need to insert a div into every comment made by the author, but somehow I need to get a round the fact that anything applied to .bypostauthor also gets applied to its nested replies.

    Thread Starter mantralux

    (@mantralux)

    Also, I can get it to work if I only have 2 levels of nested comments, but as soon as I go over that amount, it starts adding the .banner div to nested replies.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a "staff banner" to author posts?’ is closed to new replies.