I found bits and pieces of this around the forum, I glued this together to do what I want but..it ain't working...any advice? I get the first if statement to fire, but all subsequent pages use the elseif statement, and nothing gets the last else.
//Custom Stylesheets for different pages!
function custom_stylesheets() {
$pageID = $wp_query->post->ID;
if (is_front_page()) {?>
<link rel="stylesheet" type="text/css" href="<?php echo bloginfo('stylesheet_directory') ?>/stylesheet1.css" />
<?php
} elseif ($pageID = '2') {?>
<link rel="stylesheet" type="text/css" href="<?php echo bloginfo('stylesheet_directory') ?>/stylesheet2.css" />
<?php
} else {?>
<link rel="stylesheet" type="text/css" href="<?php echo bloginfo('stylesheet_directory') ?>/stylesheet3.css" />
<?php
}
}
add_action('wp_head', 'custom_stylesheets');