Skip Navigation

[Resuelto] Create a view CPT parent with a button link CTP child

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

Problem:

The issue here is that the user wanted to filter his child view by passing the ID of the parent to the view using a URL parameter.

Solution:

In order to do this you will need to create a view that will list the child. On that view you then want to add a query filter for the parent.

Once the filter is added then you will need to set it to "Post with ID set by the URL parameter " and then note the parameter that it requires.

Next you need to build a page to hold this child view.

Finally you need to modify the button on your parent listing table so that when you click it, you're taken to the page this the child view.

So the link should be.

<a href='linktochildpostviewpage?wpv-pr-child-of='[wpv-post-id]'>Click Me</a>

Once you have done this it should display the listings of the parent you click on.

This support ticket is created hace 6 años, 8 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Etiquetado: ,

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Shane hace 6 años, 8 meses.

Asistido por: Shane.

Autor
Mensajes
#626622
workoutview2018-03-20.jpg

I have a CPT parent named "member", with a CPT child called "workouts" and I need to create a view with a list of all the members where each member have a column with a button link that takes me to a view of all their own workouts. I need to create a view like this image attached. Can you give me a hint on how to do so ? thanks for your support.

site url: enlace oculto

#626714

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Screen Shot 2018-03-20 at 1.34.00 PM.png

Hi Alberto,

Thank you for contacting our support forum.

In order to do this you will need to create a view that will list the child. On that view you then want to add a query filter for the parent See Screenshot.

Once the filter is added then you will need to set it to "Post with ID set by the URL parameter " and then note the parameter that it requires.

Next you need to build a page to hold this child view.

Finally you need to modify the button on your parent listing table so that when you click it, you're taken to the page this the child view.

So the link should be.

<a href='linktochildpostviewpage?wpv-pr-child-of='[wpv-post-id]'>Click Me</a>

Once you have done this it should display the listings of the parent you click on.

Please let me know if this helps.
Thanks,
Shane