Css for sub templates work in local sandbox but not live

dang I am just having so much fun this weekend…

but seriously:

I have this link calling the css for the sub template in the header.

<?php if(is_page_template(‘subTemplateEngineer.php’)) {?>
<link rel=“stylesheet” href=“<?php bloginfo(‘template_url’); ?>/css/subtemplate01.css”>
<?php }?>

and of course the correct .css in the css folder.

I can see the results on my sandbox. when I upload it live the css styling doens’t show up.
already checked three or four times that all the files xfered properly. I check to ensure that the appropriate sub template was applied to the pages.
a bit at a loss.

I also later tried adding the following code to the style.css

@import url(‘/css/subTemplate01.css’);
@import url(‘css/contact.css’);

zilch…no better results.
(and yes I was checking to see if maybe i was a directory off hence the missing “/” in one of the links)

Anything else I can try?


Are you sure your css document is on your server? On a side note, you should avoid importing css documents and use different syntax if possible. You could also try the different syntax to see if that works.

For example:

<link rel=“stylesheet” href=“/path/to/your/stylesheet.css” />

Hope that helps,


hello shawn.
thank you for your inputj, as i stated above I am pretty sure the files did xfr to the server. checked at least three times (stopped counting at three anyway.)
as for the sintax, i’ll give your suggestion a shot. but wp uses paths differently, (for security reasons i guess) and in the sample above i am telling it that if i used a certain sub template the page needs to use a diff css.

I’ve never had to do it so I could very well be out in left field, but maybe this is something where wp_enqueue_style() would help?

Mittineague, thank you had never even heard of that will try it out and see if it works.
one of my co-workers opined that the php was to blame.
crossing fingers and thank you for that suggestion.

I’m not sure of your exact configuration but I’ve coded numerous WP sites and you can use virtually any syntax that can be applied to any other kind of website including the one I mentioned. An http request is an http request. If you instruct a browser to fetch a document in order to render a page, as long as the path is correct and you are using an http request method supported by the browser, it shouldn’t matter whether the request is embedded in a WP template or not.

smanaher, i am sure you have more experience than me. so i’ll take your word for it and give it a try.
Thank you.