Support » Fixing WordPress » Page templates with different stylesheets

  • Hello all! I’m fairly new to WordPress, so I apologize if this is a total noob question. ^__^

    I’m creating a site for a client that will have several different page templates. My client wants to ability to select one of 8 possible background colors for any particular page, regardless of the template. The flow would be “New Page” > add the title and some content > select the page template > select background color.

    My question is – what’s the best way to achieve this? While it seems like total overkill, the only way I can think is to create 8 different page templates for each color (so if I have a Homepage template, I’d create 8 different Homepage templates, 8 different MainContent templates, etc).

    I searched around to see if I could add a new page attribute anywhere, but didn’t find anything. Here is a screenshot to better illustrate what I’m trying to do:

    Once the page is created, I’d then be able to do something like the following in header.php:

    <?php if ($page_color == 'red'); ?>
      <link rel="stylesheet" href="css/red.css">
    <?php endif ?>

    I’m guessing there’s a plugin for this, but I have no idea what to search for in able to find it. >.< Any help or guidance is appreciated! Thanks all!

  • The topic ‘Page templates with different stylesheets’ is closed to new replies.