Skip Navigation

[Resolved] Filter by without relationship in view

This support ticket is created 5 years ago. 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)

This topic contains 4 replies, has 3 voices.

Last updated by Minesh 5 years ago.

Assisted by: Minesh.

Author
Posts
#1422325
Screen Shot 2019-12-23 at 18.31.23.png

Hi!
In a view, we can add a filter by post relationship (like attached image).
We need a filter by post without relationship. How can i do this?

#1422697

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please elaborate a bit more on "We need a filter by post without relationship"? Do you mean you want to filter your posts by custom field not with post-relationship?

#1424137

Yes.
I have two CPTs (1 and 2) with a relationship.
I have a view to display all CPT1.
In settings i can add a filter to display only CPT1s with any CPT2s relationship, but i need the inverse.
The view need to display all CPT1s without relationship with an CPT2.

#1424327

Hello,

Minesh is on holiday today. He will be back on tomorrow. He will get in touch with you with the latest updates on this ticket on Friday.

#1425707

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

what relationship you have between your CPTs - is it one-to-many?

so, for instance if you have a relationship between your post types X and Y where you have one to many relationships between X (one) and Y (many) post types.

Can you please explain what posts you want to display is it of X or Y and where exactly? I mean on any single post pages or X post or Y post or on any separate page?