Custom Single Post By Category

Make your single.php the following:

<?php
$post = $wp_query->post;

if ( in_category( 'work' ) ) {
  include( TEMPLATEPATH.'/single-work-cat.php' );
} 
else {
  include( TEMPLATEPATH.'/single-generic.php' );
}
?>

and make single-work-cat.php the template you wish to show for single work category posts, and single-generic.php the one you wish to show in all other cases. For more categories just add more elseif statements and make new single templates.

Leave a Comment