In the members-only forum a user asked:
I want to style the h1.entry-title differently for each parent/child page. So About page, and all its sub pages would have a class .blue-bg, Events Page would have .green-bg, etc., with css as below. I have tried using is(tree) code with conditional body_class but it is not working. Any suggestions?Below is the sample code using which we can assign different body classes to multiple sets of a Page and all its child Pages in WordPress.
To view the full content, please sign up for the membership.
Already a member? Log in below or here.