Dynamic body classes
-
I’m frustrated beyond all belief right now. I’ve been trying to apply different CSS to the body of different page groups and I’m losing my mind. Forgive me, but I’m well versed in HTML & CSS, but php has never been a strength of mine. This project is a freebie for my church.
I need to apply a different style to specific pages (not posts) and their child subpages. I’ve tried using built-in body classes, such as page-child parent-pageid-(id) in CSS and just can’t get it to work and I’ve tried darn near every method listed on Perishablepress’s (https://perishablepress.com/press/2009/05/26/dynamic-body-class-id-php-wordpress/ ) site.
What I’d like is to style a parent (and children) with a body class of .church, another parent and their children with .school, and another parent/children with .daycare. All of the forums and blogs out there say it is sooo simple with dynamic body classes (which I believe), but I just can’t seem to get it figured out. Any input, thoughts, suggestions are much appreciated. Thanks in advance.
- The topic ‘Dynamic body classes’ is closed to new replies.