WordPressで複数カテゴリを扱う場合、スタイルシートを別のものにしたいときも。
スタイルシートを指定している箇所(基本的にはテーマファイルの「header.php」のなか)を次のように書換。
スタイルシート条件分岐
<!--スタイルシート条件分岐-->
<!--// ホームページ-->
<?php if( is_front_page() ): ?>
<link href="<?php bloginfo('template_directory'); ?>/style0.css" rel="stylesheet" type="text/css" media="all" />
<!--//カテゴリID=1の記事-->
<?php elseif( in_category('1') ): ?>
<link href="<?php bloginfo('template_directory'); ?>/style1.css" rel="stylesheet" type="text/css" media="all" />
<!--//その他-->
<?php else: ?>
<link href="<?php bloginfo('template_directory'); ?>/style2.css" rel="stylesheet" type="text/css" media="all" />
<?php endif; ?>