I'm using wordpress and I made a custom page template and I want to attach a different css style to it instead of using the main style.css. How can I do this?
you can try this hack open header.php and find the first stylesheet tag <?php if (is_page('your-page-id')) { ?> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom.css" type="text/css" media="screen" title="custom"/> <?php } else { ?> <!-- this is deafult css for all blog page --> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <?php } ?> Code (markup): note: you also must have styling for footer,header,etc for the theme in custom.css so i won't break.
You can do what mich said , but if you have CSS + JS to add, I use a use: and then make an extra .php with all of the <head> includes