Page-Specific Templates
-
I’m making a WordPress website where lots of pages vary in colourscheme, but not layout. Is there an easy way of getting a certain page to select a stylesheet without using page templates or conditional tags? I kind of want it to be future-proof, so that as subpages are added, they continue to use the same template as the page parent.
Perhaps some sort of global variable, whereby I have the variable store the page slug, and then use the variable to select the directory for the stylesheet.
Kind of like
<?php include($slug . "/style.css"); ?>
Any thoughts on this would be appreciated.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Page-Specific Templates’ is closed to new replies.