Saltar navegación

[Resuelto] How to show category (taxonomy) of parent element in child element?

This support ticket is created hace 3 años, 4 meses. 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

Supporter timezone: Africa/Casablanca (GMT+01:00)

Este tema contiene 4 respuestas, tiene 3 mensajes.

Última actualización por aitorS hace 3 años, 4 meses.

Asistido por: Jamal.

Autor
Mensajes
#2141779

I have tried with the following shortcode but it does not show anything: [wpv-post-taxonomy type="especialidad-oposicion" item="@oposiciones-formulario-de-contacto.parent"]

#2141935

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you first please share bit more details where exactly you are using the post taxonomy shortcode you shared.

If you can share problem URL and access details and share details what is your expected output I'll quickly check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2141975

I have an entry creation form (CPT = contact) showing on a course page
I have a child-parent relationship as follows: 1course - Xcontact
In the form I already collect some information about the child-parent relationship, including the child-grandparent relationship, these data are displayed without problem.
[cred_field field = 'course' force_type = 'field' class = 'form-control' output = 'bootstrap' value = '[wpv-post-title field = "@oposiciones-formulario-de-contacto.parent"] ']
[cred_field field = 'school' force_type = 'field' class = 'form-control' output = 'bootstrap' value = '[wpv-post-title item = "@oposiciones-academy.parent"]']
I want to include in the contact form the category to which the course belongs to which it is being shown by means of the child-parent relationship, I try to use the shortcode: [wpv-post-taxonomy type="especialidad-oposicion" item="@oposiciones-formulario-de-contacto.parent"] but it does not show me anything.

#2143661

Hello there! Minesh is on vacation for a couple of days. If you don't mind, I'll continue with you on this ticket.

Passing a field's value using the value attribute is not supported for taxonomies as you can see on the documentation on this screenshot enlace oculto

You will need to use other means. For example, you can use the cred_save_data action hook to assign the same terms to the child post. Check an example on Minesh's reply here https://toolset.com/forums/topic/assign-parent-category-to-child-post/#post-438559

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

#2147377

Thanks a lot!