WordPress.org

Ready to get started?Download WordPress

Forums

different post designs by category? (3 posts)

  1. AaronPowell
    Member
    Posted 6 years ago #

    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.

  2. Cathy Tibbles
    Member
    Posted 6 years ago #

    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)

  3. Ivovic
    Member
    Posted 6 years ago #

    in_category('id') works outside the loop... if that's of any use.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags