script single.php for one category showing post twice
-
A little confusing, but I’m making a special version of single.php just for one category’s posts. So I found a PHP script that triggers the right PHP script for that category. Or so I had thought.
The script is in single.php and is:
<?php if (in_category('3')) {include (TEMPLATEPATH . '/single-3.php'); } else { include (TEMPLATEPATH . '/single.php'); } ?>It works but not completely. I get two version of the same post. One from the single-3.php template (category id is in fact, 3) and then the footer and then the post coming from the single.php template. Anyway I can fix this up?
The topic ‘script single.php for one category showing post twice’ is closed to new replies.