Skip to:
Content
Pages
Categories
Search
Top
Bottom

Alternate Post Backgrounds

  • @lolloverminutes

    Member

    Pardon my probable ignorance, but I was working on modding a wordpress theme to work with my bbPress install. I was wondering how to make it so that posts alternate color.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @mdawaffe

    Member

    If you look at the default topic template (bb-templates/topic.php), you will see

    <li id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>

    the alt_class() function gives every other li element a class="alt".

    So if you use that function in your topic template, you can put something like

    .alt { background-color: red }

    in your CSS file.

    @lolloverminutes

    Member

    Thank you very much. :D

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar