Tips from Idea15 Web Design

I have nothing to declare but my DOCTYPE.

Using a different CSS stylesheet in WordPress

with 3 comments

Last year I did a very simple site on WordPress for Designer Waxing Glasgow, a new business which started by specialising in cosmetic and intimate waxing for ladies.  Naturally, we were able to go over the top with a very girly pink visual design.

This year Jennifer expanded her business to include the increasingly popular service of male waxing.  She wanted the male bits (heh) to go on the site, but obviously we could not use girly pink to sell male waxing.  The new pages had to have the same layout but a different CSS-based design.

The solution was to add the following code to header.php:

<?php if ( is_page(array('male-waxing','male-waxing-faqs')) ) { ?>
<link rel="stylesheet" href="/wp-content/themes/designer-waxing/manstyle.css" type="text/css" media="screen" />
<?php } else { ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php } ?>

with the different pages noted in the array and the URL of the different stylesheet following. You can see the results on her Male Waxing page (NSFW or uppity Americans.)

Written by Idea15 Web Design

2 March 2009 at 11:32 pm

Posted in Web Design

3 Responses

Subscribe to comments with RSS.

  1. nice touch!

    Cat

    11 June 2009 at 4:22 pm

  2. Thank you so much! This helped me a lot!

    Kevin

    17 June 2009 at 10:33 am

  3. Thanks so much…..that will help a lot.

    Now if I can just have someone do a css that will allow for 3 column background….with differnt colors for the left and ride sidebar areas my life will be complete!

    Lorian Rivers

    21 October 2009 at 12:40 am


Leave a Reply