Support » Theme: Spun » tag and category colors

  • Resolved miharbio



    Is there a simple way to manage colors and effects for specific categories and tags of posts?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Caroline Moore


    Sure, read up on the body_class() function, which applies specific CSS classes to tags and categories (among other things).

    Thanks, though, it’s been a little hard trying to wrap my head around this…

    I know coding help here is merely a courtesy.., but do you know where I might be able to find more thorough examples?

    thanks, again

    Moderator Andrew Nevins


    Forum moderator

    Hi Miharbio,
    Do you have Google Chrome?

    I do. Is there a way inspecting the elements of the page will guide me here?

    Moderator Andrew Nevins


    Forum moderator

    Yes, for example, right click on the page and select ‘inspect element’.
    You can see a new toolbar appear that exposes the HTML (on the left) and CSS applied to that HTML (on the right).

    Try searching through the HTML for particular classes that uniquely identify the post/ page, in relation to Caroline’s advice.

    Look at the <body> element. That has a bunch of classes, of which the unique class may be something like ‘page-id-10’.

    You can then construct some CSS from this:

    .page-id-10 .post {
     background: deeppink;

    Ohh, I think I see, now.

    I didn’t understand how what wordpress calls “tags” and “categories” are processed as “classes” with the code, if that is the right way one would say it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘tag and category colors’ is closed to new replies.