get_template_part()
if ( in_category( 'news' ) ) {
get_template_part( 'templates/single', 'news' );
} elseif( in_category( 'articles' ) ) {
get_template_part( 'templates/single', 'articles' );
} else {
get_template_part( 'templates/single', 'default' );
}
<?php
$post = $wp_query->post;
if (in_category('news')) { //slug категории
include(TEMPLATEPATH.'/single-news.php');
}
elseif (in_category('individualnyj')) { //slug категории
include(TEMPLATEPATH.'/single-individualnyj.php');
}
else {
include(TEMPLATEPATH.'/single-default.php');
}
?>