I created a view 'Werkvormen' on CPT Werkvormen.
I'd like to use this view at at least 2 different pages showing different results.
A custom field 'Pagina-werkvorm' defines whether a werkvorm should show on Page1, Page 2 or on both pages.
The view should show team-related werkvormen on page hidden link. (Pagina-werkvorm string in ('Team', 'Both')
Page hidden link should show werkvormen that are person-based. (Pagina-werkvorm string in ('Individual', 'Both')
However, changing the filter on one page also influences the results on the other page.
Question: Is it possible to somehow set the filter on a per-page basis?
Based on what I see here you basically want the same view on 2 pages but with filters for 2 different post types correct?
If so then I would recommend creating a copy of your view and changing the setting on the copy to reflect what you want on the second page.
Are you aware of how to create a duplicate for your view ? Are you creating your view with the classic editor or are you using the Gutenburg editor to create your view.
In order to understand correctly, you're using the same filter on the frontend correct but you essentially want the results to be prefiltered differently based on the page correct?
I created a CPT 'Werkvormen' and added a fieldgroup with custom fields.
One of these custom fields is called 'page-to-display-on'.
This custom field contains a value of either 'Page A', 'Page B' or 'Both'.
Now on Page A I want to show all 'Werkvormen' that meet the criteria "'page-to-display-on' IN ('Page A', 'Both')".
On Page B I want to show all 'Werkvormen' that meet the criteria "'page-to-display-on' IN ('Page B', 'Both')".
I use the same view on both pages.
Is it possible to set/change the filter on Page A and Page B so that the correct 'Werkvormen' are shown on these pages?
Essentially you want the view to be prefiltered based on the page that the view is on.
This case then we should be able to achieve this with one of our view hooks. Would you mind allowing me to have admin access to the website as well as a link to the page where I can see the views.