Skip Navigation

[Resolved] One query filter in one view overwrites another query filter in another view

This thread is resolved. Here is a description of the problem and solution.

Problem:

I need to use a Query Filter for each of the two views, so only Artworks connected to the Art Fair in question are shown, and Artists connect to the Art Fair are shown.

Solution:

It was a problem with view caching, I cleared the cache and recreated the view and the two separate Query Filters for the two separate views worked fine.

Relevant Documentation:

This support ticket is created 4 years, 2 months 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
- 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)

This topic contains 2 replies, has 2 voices.

Last updated by amjadM 4 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1827017

I am trying to:

I have an "edit art fair" content template that allows to edit an art fair CPT but also allows adding/removing artworks and artists CPTs as child posts via a many-to-many relationship to the art fair.

So, I also have two relationship forms in this template: Artworks in Art Fair form and Artist in Art Fair form

Both of these also have below them their respective Views, where "Artwork Art Fair View" shows which Artwork CPTs are connected to the Art Fair CPT and "Art Fair Artists Edit" view that shows which Artists are connected to Art Fair that is being edited in the Edit Art Fair content template.

My problem is that I need to use a Query Filter for each of the two views above so only Artworks connected to the Art Fair in question are shown, and Artists connect to the Art Fair are shown.

Currently, the Query Filter from one View is overwriting or replacing the Query Filter from the other View, depending on which you set. You can try setting the "Artwork Art Fair View" Query Filter to show only Artworks in a relationship with the current post (Art Fair), and it modifies the "Art Fair Artists Edit" view Query Filter on the same page.

I need this fixed so the two views can have two separate query filters.

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

#1828175

Hello,

Thanks for the details, I can login your website.

I assume we are talking about this content template "Edit Art Fair Template":
hidden link

Where do you display above content template in front-end? it should be display in front-end for single "Art Fair" post, for example:
hidden link

I have tested above URL, it works fine, you can try it directly.

I suggest you follow our document to setup the edit link:
Front-end Forms for Editing Content in WordPress
https://toolset.com/course-lesson/front-end-forms-for-editing-content/
section "Insert link to the Content Template that displays the form"

#1828735

Hi, it was a problem with view caching, I cleared the cache and recreated the view and the two separate Query Filters for the two separate views worked fine.My issue is resolved now. Thank you!