Grow your CSS skills. Land your dream job.

WordPress Single Custom Post-type Taxonomy Template

  • # December 6, 2012 at 12:10 pm

    Hi

    I’m pretty familiar with the [WordPress template hierarchy](http://codex.wordpress.org/images/1/18/Template_Hierarchy.png “WordPress Template Heirarchy”), but have a (fairly simple) question about custom post-types…

    I want to create a different single view (single.php) template for a custom post-type taxonomy. I already know that I can create a template page _single-$post-type.php_ and have done so. But I’d like to create a template _single-$post-type-$taxonomy.php_

    Is this doable?

    To elaborate:

    - I have a custom post-type _”products”_
    - I then have custom post-type taxonomies: _”bricks”_, _”tiles”_ and _”cladding”_
    - I already have different archive views for different taxonomy terms (_e.g. taxonomy-product_types-tiles.php_)
    - I’d like the **single-view** for _bricks_ to be different to _cladding_
    - I’d like to do this by having a different single.php file for each custom post-type taxonomy in the same way as one can have a different _archive-$taxonomy-$term.php_
    - I’d like something like _single-product_types-tiles.php_

    Help?

    Or am I being dumb and this is just _taxomony-$term.php_ ?

    Thanks in advance.

    # March 29, 2013 at 5:31 am

    > I’d like something like single-product_types-tiles.php

    So, how you do that?
    Plese, help!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".