Sauter la navigation

[Résolu] The View Query filter don’t display the relationship child post

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

Problem:
How to display related child post related to current post displayed

Solution:
You need to add correct view's query filter. You should add post relationship filter:

post relationship filter
Select posts that are children of the Post where this View is shown.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/the-view-query-filter-dont-display-the-relationship-child-post/#post-617561

Relevant Documentation:

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Auteur
Publications
#617103
lista immobili nuova costruzione View loop.png
relationship from Appartamento al 1 piano property.png
Query from Lista immobili nuova costruzione view.png
From Nuove Costruzioni CPT.png

I am trying to: Create a relationship between the posts about 2 CPT

Link to a page where the issue can be seen: lien caché

I expected to see: The related child posts selected by the relationship form in the post editor.

Instead, I got: "No items found"

See the attached images

#617281

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I checked on your install and there is something going wrong with your post relationship setup between your post type.

See the following screenshot - I do not see post relationship setup as post relationship box is empty - nothing displayed:
=> lien caché

#617338
relationship from Nuova Costruzione ‹ Casasi Immobiliare - progetto castello.png

Hi, I have setted the post relationship setup and now in the post relationship box there is the fields that I want to display (see the attached image).
But here lien caché return "no items found"...

#617561

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - I would like to know here - "nuova-costruzione" is set as parent post type and you are currently displaying the parent post here:
=> lien caché

As I understand - you want to display related child i.e. "Immobili" belongs to currently displaying "nuova-costruzione" post - correct?

If yes - you need to set CPT "Immobili" from your view's content selection and then you should add post relationship filter:

post relationship filter
Select posts that are children of the Post where this View is shown.

And as you are currently displaying parent post, and if you need to display child post information, you should use types shortcode without "id" attribute as you want to display the post information from CPT "Immobili" to which the view is set to display it from content selection section. Whenever you want to display parent post information, you should use "id" attribute with parent post type slug.

Could you please check - is this the required output?
=> lien caché

#617633

Yes, your scenario is what i need to have, and your replay was very helpfull.
Now I can see the child post from "immobili" to the parent post "nuova costruzione".

#621402

Hi, Sorry if I reopen this thread, but I see a new Toolset update that change the relationship method.
So, if I update Toolset to new version, what should I do to not have issues to display the child posts into the parent posts?
I have seen the guide but it is not clear...
Can you help me, please?