Using a post type as taxonomy
-
Hi there ! I’m desperately trying a proper way to do what I want here so I hope someone will have a solution.
What I would like is to have taxonomies that are directly linked to a post type. I’ll give an example :
Let’s say I have a website about fruits, with one custom post type (thanks to CPTUI) “Fruit” which I use to create a page for each fruit (one page for pear, apple or cherry for example).
Let’s say then I have a second post type “recipes”. In each recipe I use some fruits. What I’d like to do is that when I create a recipe, I can tick taxonomy-like fields directly linked to the cpt “Fruit”. The idea is then to have on each recipe a dynamic field “Fruits used in the recipe” with dynamic text and link in it related to the selection I made.For this, people told me to make the « Fruit « post type a taxonomy and I agree that it would work. But the reason I really want a way to have it is because of multiple parent child layers and multiple parents thing. I’ll continue with the example of fruits :
On a page named “red fruit salad recipe” I want to have dynamic links to the fruits used (so it eventually works with a taxonomy) but I also need a link to the parent pages which here for example can be “fruit salad recipes” and « summer recipes ». You could tell me that I can create “fruit salad recipes” as a taxonomy too, but then my problem is that if, in a few weeks, I create a sub-sub recipe named “strawberry salad recipe” I want it to have “red fruit salad recipe” but also for example « summer recipes » as parents. So it means that I can’t use the WordPress parent child system because I need multiple parents and cannot use taxonomy because otherwise I would need to move a page to taxonomy when it becomes itself the parent of a new page.
So does anyone have an idea of what can I do exactly ?
Thank you in advance 🙏🏻 -
Hello there,
Many thanks for reaching out.
Are you able to confirm the URL of the website that you need assistance with please?
Have you created these taxonomies manually, or via a plugin?
- The topic ‘Using a post type as taxonomy’ is closed to new replies.