Skip Navigation

[Gelöst] Create a view CPT parent with a button link CTP child

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 6 Jahren, 7 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 6 Jahren, 7 Monaten.

Assistiert von: Shane.

Author
Artikel
#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: versteckter Link

#626714

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: 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