Support » Themes and Templates » No category selector in body tag?

  • I love this theme, but it does have some weird ways of doing things.

    I just noticed that it doesn’t put the category selector (usually “category-whatever”) in the Body tag’s class. That’s really weird, because that’s quite useful for modifying pages.

    For example, I’ve got a bunch of pages I’ve categorized as “Outdated”, and I’ve added a div I want hidden on every page except those in the Outdated category. Normally it’d be a simple matter of adding body.category-outdated div#outdated {display:inherit;} to have the hidden div show on Outdated pages, but p2 doesn’t seem to support this feature.

    Anyone have any idea how to add the category selectors back into the body tag?

Viewing 1 replies (of 1 total)
  • imho, a category specific body class is only added in category archives, while you expect it in a page-of-posts (i assume, as pages don’t have categories) (which in your case shows posts of a specific category).

    you might need to work with the body class which is identifying the page template – .page-template-templatefilename-php

Viewing 1 replies (of 1 total)
  • The topic ‘No category selector in body tag?’ is closed to new replies.