Skip Navigation

[Résolu] How to set default query before the filter choosing happen ?

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

Problem:

One-to-many relationship between post types "Project" and "Listing"
In a single "Project" post, I want to display related "Listing" posts.

Solution:

You can follow our document to setup the post type relationship filter:

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

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

Auteur
Publications
#1142868
Template.JPG
Filter.JPG

I have a custom post type call "Project"
I want to make a section where you can filter the child "Listing" of this project

<a href="<em><u>lien caché</u></em>"> Example Project</a>

But I can't see how can I choose the query with in setting in "custom search view"

I want it to show only the child listing and specific status "buy" as a default
as you can see in the picture filter.jpg

Thank you

#1142929

Hi,

I assume we are talking about this case:
One-to-many relationship between post types "Project" and "Listing"
In a single "Project" post, you are going to display related "Listing" posts.

If it is, please edit your view, click the link "Screen Option", enable option "Query Filter".

Then in section "Query Filter", add a post type relationship filter by following our document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

#1143116

Oh,it's there
I don't even know all the thing is in Screen Option.
Thank you!