Hi, I wonder if there is any option to set so I can get another background color on a blog post. For example, the default color is white, but some posts can be set in another background color. / Lars
The simplest option would be to use the Simple CSS plugin. Then you can add page specific CSS via the meta box provided in the page editor and use this code:
Thank you very much for the reply. I realized that I did not put my question correctly. What I’m looking for is the background color of the content area. The background color of the post should therefore be unique to just one post. Hope you understand what I mean. / Lars
Letś say that I have 5 posts on my blog flow, all have the default background color in the container, all except post 2 that has a red background container. /Lars
Thats a fun one. Not easy, but how about we use Taxonomies to style the different backgrounds?
By default WP adds the taxnomies as classes to the article e.g category-red or tag-blue so you can use them to style elements like so:
Now any article with a Tag of Red will get those styles. Just create a library of tag colours as you go =) And you can scrap the above CSS as this will apply to blog and single posts.