I would like to have a page dedicated to gathering plants in nature. So lets say that in march and april it is possible to pick nettle leaves, while in september and october its root should be gather.

So I did a custom post type for a plant and two taxonomies - Months and Plants-part.

Is there a way to connect both taxonomies on the same post while still staying separate? Because I would need to fetch data based on a month.

Ocasionally, there would be a need for multiple data for same plant, for example

Some plant / latin name / tips
- roots -> october
- fruit -> march, april
- leaves -> august
- seeds -> september

1 Answer 1


It makes sense that each attribute should be a taxonomy - eg roots, leaves, seeds - but you don't need a separate taxonomy for months. Instead, the months should be the terms of these taxonomies.

The second argument to register_taxonomy in each case should be the name of your custom post type. This will mean you'll get a box for each taxonomy on the 'Edit Plant' screen. And in each box, a list of months (you'll need to populate this yourself).

Obviously this makes it straightforward to get the months of interest with respect to a certain plant, but it's perfectly possible to go the other way. For instance, if you wanted to get all of the plants which were of interest in a given month, you could construct this query quite easily.

  • Ty, i finally did it and it works for populating into database :) im still battling with retrieving terms but I'll try a little longer and if I dont succeed I'll post a question
    – Marko
    Commented Aug 6, 2014 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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