- This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by .
- The topic ‘Custom Body Class on Sub Page 'Depth=3'’ is closed to new replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Hi, wondered if you could help me to append a custom body class on child pages (excluding posts) that specifically have a depth of 3.
i.e. Globally append '.three' to: Page > Page > **This Page**
without having to add the custom class manually to each page at this level.
PS: Sample child theme used.
You could do something like this, but it assumes that your page depth is how you have it organized in the page hierarchy, not menu hierarchy.
Due to code posting problems, I just made it a snippet here: http://dreamwhisperdesigns.com/?p=1112
Perfect, thanks Jen.
© 2023 WPEngine, Inc.