if post count = 1, use template single.php
-
My navigation displays categories. When a visitor clicks a category the category.php template is used, showing a list of posts with their excerpts. This works fine if there is more than one post in the category. But if there is only one post, it looks silly to have one item in a list. I am looking for a way, maybe a conditional statement or a querry, that says: if post count = 1, use template single.php instead of category.php. (Would I put that statement in category.php? I’m using NavT to create my menu.) Can anyone show me how to do that?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘if post count = 1, use template single.php’ is closed to new replies.