Forums

[resolved] Individual Post Template Based On Category Possible? (5 posts)

  1. arcab4
    Member
    Posted 4 years ago #

    since i found the wonderful world of "page templates" (ability to create seperate templates for each page in wordpress) i have a problem i can't figure out.

    i am having trouble trying to find out how to do that for posts based on the category it's in. i would like to have a different layout for each post depending on the category it's assigned to.

    my template doesn't have a 'single.php' but uses the 'index.php' instead to display the posts.

    it doesn't seem to be as easy as creating a 'page.php' page and renaming it and selecting it in the admin.

    thanks!

  2. arcab4
    Member
    Posted 4 years ago #

    i've also come across that plug-in but am reading that those with newer wordpress might have compatibility issues....unless that plugin has been updated?

  3. myfishtanknet
    Member
    Posted 4 years ago #

    would using if statements be the only way ? that's all i can think of right now. like

    if in these categories
    do this..
    elseif in these categories
    do this
    else
    do this?

  4. moshu
    Member
    Posted 4 years ago #

    If you are talking about Kaf's plugin - that works with 2.5.

  5. arcab4
    Member
    Posted 4 years ago #

    oh okay. cool. just for future reference for anyone looking for a solution. here is the link

    http://guff.szub.net/2005/07/21/post-templates-by-category/

Topic Closed

This topic has been closed to new replies.

About this Topic