I’m trying to get up to speed with the terminology of the ins and outs of WordPress, so apologies.

I’m setting up a full site utilizing WordPress and a custom template, basing it on TwentyTen underpinnings.

I’m trying to have as much as possible under the “post” Post Type, and the top level “list” pages just be the category pages.

One category is “work”

I’ve been able to customize those by making custom category-work.php and loop-work.php files. But how do I go about making a custom single post by category?

It looks like making a single-work.php would look for a custom post type called “work.” Is there a way to make a single.php modified clone that is triggered by category / category slug?

2 s
2

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 Reply

Your email address will not be published. Required fields are marked *