WordPress.org

Ready to get started?Download WordPress

Forums

Custom single post template based on taxonomy (1 post)

  1. adam533
    Member
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic