Skip Navigation

[Résolu] Display child post field in a parent view

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Display a child post filed in a parent view inside a table, where the parent view render using data from both parent and child custom posts

The issue i have is that the table i create need to display content from parent and child posts
do i need to insert view inside a view? i.e. in the table cell insert a view of a child to display one field?

Solution:

You are right, it needs a nested view, you need to create a child view, and put the child view into one table cell of the parent view, but I suggest you use only one table cell to display the child view, and the table sort feature won't be able to work in this cell.

Here is a document "Views Inside Views - Create Nested Structures":
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

For your reference.

Relevant Documentation:

https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

This support ticket is created Il y a 6 années et 10 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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: Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 6 années et 10 mois.

Assisté par: Luo Yang.

Auteur
Publications
#609997
List.JPG

Tell us what you are trying to do? display a child post filed in a parent view inside a table, where the parent view render using data from both parent and child custom posts

Is there any documentation that you are following? https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

Is there a similar example that we can see? not sure

What is the link to your site? lien caché

the issue i have is that the table i create need to display content from parent and child posts
do i need to insert view inside a view? i.e. in the table cell insert a view of a child to display one field?

Please advice,
Thanks,

David

#610077

Dear David,

You are right, it needs a nested view, you need to create a child view, and put the child view into one table cell of the parent view, but I suggest you use only one table cell to display the child view, and the table sort feature won't be able to work in this cell.

Here is a document "Views Inside Views - Create Nested Structures":
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

For your reference.

#611107

Hi Luo,
ok i got it. I will give it a shot and see how it looks like.

Thanks,

David

#611260

You are welcome