Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am working on a theme which has options for suit & shirt designing. Basically, I am stuck in creating taxonomies for suits & shirts.

Reference Link

Problem I am facing is to plan how the taxonomies should go: e.g.

  1. type:
    • suit
      • jacket
        • style & measurement options
      • trouser
        • style & measurement options
    • shirt
      • style & measurement options

now this is something in my mind, but there are also some things to think of, when I will select a suit and go for jacket options or trouser options, I have to load image for each style option and show the user how the finished product will look like.

Any suggestions will be appreciated as all these options are required to be configurable from admin panel.

share|improve this question
1  
Why do you want to use just one taxonomy? Style sounds like a good candidate for a second taxonomy, measurements are probably post meta data. –  toscho Sep 1 '12 at 12:39
    
@toscho: thanks for the suggestion, but there will be different options for measurements and which have to be defined through taxonomy, I guess so, what do you suggest? e.g. trouser length will be a dropdown having different values e.g. 28" upto 55". –  booota Sep 2 '12 at 6:29
add comment

1 Answer 1

up vote 1 down vote accepted

Taxonomies in WordPress don’t work like in biology or similar fields. They are not mutually exclusive. There are some ways to simulate such a behavior (see post formats for an example), but in general you have to expect cases where on post object belongs to more than one taxon (term). And there is no really useful sorting for taxons of the same level.

You can use a taxonomy for data that are hierarchical and mutually exclusive. But very often it is better to use a hierarchical custom post type and the Posts 2 Posts plugin. Unfortunately, there is no built-in equivalent in WP.

Then there are post meta data. Not hierarchical, easy to sort, bot no meta for the meta. :)

Don’t let you guide by the expected menu order when you assign taxonomies or other meta data. Building a menu structure (the view) should be kept a separate problem. You don’t want to change all these data when you decide to change the menu.

My suggestion: Use a hierarchical taxonomy for data that are similar and really from the same hierarchy. Use post meta for everything you have to compare: geo data, on/off values … if you need a radio button it is probably not a taxonomy.

Do use a taxonomy for cases where you may want to assign multiple values: color, layout position, topic.

When I create my post objects I try to eliminate some options first: How would I do that without custom taxonomies? Without post meta data? Without custom post types? How would my queries look like? Then I find step by step what is really necessary.

For your special case I would use a hierarchical taxonomy for the type (jacket, shirt) unless I need a lot of meta data. There is still no real meta data support in WordPress. Then I would use custom post types.
For colors, material and anything else that doesn’t have to be sortable (features) I would probably use flat taxonomies. One item might be available in multiple sizes … could be a taxonomy too.
And countable or sortable properties are post meta data: weight, amount of available items, washing temperature (correct word?), article number, on sale etc.

share|improve this answer
    
can you assist me if i use woocommerce & woostore(theme), is it possible to get the referred site's features to be setup using woocommerce? –  booota Sep 6 '12 at 6:30
    
Sorry, I have no experience with WooCommerce. –  toscho Sep 6 '12 at 6:36
    
any other framework/plugin that you can refer me to... thanks in advance –  booota Sep 6 '12 at 6:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.