Support » Fixing WordPress » different post designs by category?

  • I did some digging but couldn’t come up with an answer on this one. I’d like to have entirely different page designs based on category. For instance, I have one category called “The Hole” for the serial novel I’m writing. I’d like the category archive for that to have its own design (which I managed to figure out how to do) and also the single.php pages as well. This latter is causing me trouble, however, since I can’t seem to get at the category variable until I’ve run the loop. Any suggestions? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Cathy Tibbles


    This here is how WP chooses a template. So if you design a category-6.php template, that is the one that wp will use when displaying the cat-6 posts. (replace the “6” with the ID of the category you’d like to customize)

    in_category(‘id’) works outside the loop… if that’s of any use.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘different post designs by category?’ is closed to new replies.