• Resolved villamide

    (@villamide)


    Hello everyone!

    I’m wondering if there is any way to display posts with a different single.php depending on their category, in other words, is there any method to be able to make WordPress to look for a different ‘single.php’ file for each category?.
    I’m trying to set different functions and different layouts for each post depending on its category.

    For instance:

      Categories

    • fruits (category-fruits.php)
    • –> single-fuits.php

    • vegetables (category-vegetables.php)
    • –> single-vegetables.php

    • meats (category-meats.php)
    • –> single-meat.php

    I’ve been reading The Codex and looking for a solution in the forum but i can’t find any.

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘single.php for each category’ is closed to new replies.