Saltar navegación

[Resuelto] How can 2 taxonomies have parent-child relationship

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
The user would wonders if we can link taxonomies in relationships.

Solution:
Relationships are only available for custom post types. They are not possible for taxonomies. So, we can't really connect two taxonomies in a one-to-many relationship.

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Zona horaria del colaborador: Africa/Casablanca (GMT+01:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por andrewO-7 4 years, 10 months ago.

Asistido por: Jamal.

Autor
Mensajes
#2147939
cant make camry a child of toyota.PNG

Tell us what you are trying to do?
I'm trying to add the the value "Camry" as a child to the value "Toyota". Toyota is a value under the "Make" taxonomy. Camry is value under the "Model" taxonomy.
Is there any documentation that you are following?

Is there a similar example that we can see?
I can do this under the regular wordpress categories. I can simply make Toyota a category, and all the Toyota models like Camry, Rav4, etc, child categories under the parent category Toyota
What is the link to your site?

#2148739

Hello and thank you for contacting Toolset support.

Relationships are only available for custom post types. They are not available for taxonomies. So, we can't really connect two taxonomies in a one-to-many relationship.

However, if you build a view with search filters, by default the view will offer options that can produce results. So, if you choose in the "Make" taxonomy filter, you will get only the options in the "Model" taxonomy that produce results. If you have only posts that have the "Camry" term, you will get only the "Camry" term in the search filter for "Model".

I hope this answers your question. Let me know if you have any questions.

#2150977

My issue is resolved now. Thank you!