Support » Themes and Templates » Custom single post template based on taxonomy

  • I have created a custom post type titled shirts along with a custom taxonomy titled colors. What I am looking to do is have one page that pulls all the posts created in “shirts”. When the user clicks on the shirt they get taken to single-shirts.php. What I am looking to do is create a custom single.php page based on the taxonomy assigned. So I could create individual templates for green, blue, red, etc.

    If I am unable to do that, I would like to setup a conditional statement inside the single-shirts.php. Something that would say if blue – do this, if red – do this, else – do this.

    Are either of these possible with custom taxonomies? I hope so because this is the end of the project that is due tomorrow 🙂

    Thanks for any help

  • The topic ‘Custom single post template based on taxonomy’ is closed to new replies.