single.php not working after upgrade from 2.9.2 to 3.0.1
-
I have a single.php file that’s used to establish custom post templates for different categories on my site. Everything worked fine from 2.2 to 2.9.2, but it stopped working with my upgrade today to 3.0.1.
All posts, regardless of category, now default to a generic single-post.php template file.
Any ideas why this suddenly isn’t working? I’ve tried searching forums and google, but haven’t found any mentions of this. Here’s what my single.php file looks like (I cut a bunch of elseif blocks out):
<?php
$post = $wp_query->post;if ( in_category(‘5’) ) {
include(TEMPLATEPATH . ‘/single-5.php’);} elseif ( in_category(‘8’) ) {
include(TEMPLATEPATH . ‘/single-8.php’);} elseif ( in_category(’16’) ) {
include(TEMPLATEPATH . ‘/single-16.php’);} else {
include(TEMPLATEPATH . ‘/single-post.php’);
}
?>
- The topic ‘single.php not working after upgrade from 2.9.2 to 3.0.1’ is closed to new replies.