WordPress.org

Ready to get started?Download WordPress

Forums

Colour for individual posts? (5 posts)

  1. ingalo
    Member
    Posted 8 years ago #

    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?

  2. ingalo
    Member
    Posted 8 years ago #

    bump

  3. Silkjaer
    Member
    Posted 8 years ago #

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

  4. Silkjaer
    Member
    Posted 8 years ago #

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

  5. weepel
    Member
    Posted 8 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic