Parent page stylesheet
-
I’d like to choose a stylesheet for a page based on a parent page. So:
Family tree
> Anna
> Bill
> Carla
> > Abby
> > Bernard
> > > Andrea
> > CarolynSo, let’s say that I want Abby’s pages, as well as her children’s, to have a green background. I’d like to be able to do that by adding a single line in a single css file that says
body {background-color: #9f9;}
I realize that I can do this by manually setting a template for that page. That’s far too messy for this kind of thing. I want to have a line that says something like this:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('parent_stylesheet_url'); ?>" />
… and have it look at all parents.Can this be done? Is there a plugin I haven’t found?
(It can be done easily with categories on posts. I’m a crap programmer, and I got that working. It works by post name as well as an arbitrary meta field. I just want it to be able to do that with page parents, too.)
- The topic ‘Parent page stylesheet’ is closed to new replies.