WordPress.org

Support

Support » Themes and Templates » Colour for individual posts?

Colour for individual posts?

  • I have a div.textwrap around each post, which I would like to be able to have a different background colour on, for each and every post… Somehow.

    Is it possible, without having to do it manually in the css file everytime I post?

Viewing 4 replies - 1 through 4 (of 4 total)
  • bump

    you could add a counter variable inside the loop.. like

    $counter++;

    then you could do something like

    if ($counter % 2 == 0) {

    Do something

    }

    that would “do something” for every second post..

    or you could check what categories its in, and if its in a specific category, do something special..

    Can anybody please tell me few steps on how to have a different background colour on, for each and every post? I’m dying to know this too…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Colour for individual posts?’ is closed to new replies.