I have 2 custom post types which are connected through a 1-to-many relationship: WINES and AWARDS (1 wine can have 0 … n awards).
I try to create a page that lists all awards, grouped by wine. This looks like this:
Wine A 2018
– Award 1
– Award 2
– Award 3
Wine A 2019
– Award 4
Wine B 2018
Wine C 2018
– Award 5
– Award 6
To achieve this I have set up 2 views: the first one displays the wines, the second one (which is embedded in the first one) displays the awards of a wine.
So far, so good. This works fine as long as this list is NOT filtered. But as soon as I filter the list by the wine name (e.g. Wine A), only the wines are displayed, but not their awards:
Wine A 2018
Wine A 2019
Somehow this makes no sense for me. What am I missing?
Hi,
Thank you for contacting us and I'd be happy to assist.
To troubleshoot this, I'll need to see exactly how these 2 views are set up in the admin area.
Can you please share temporary admin login details along with a link to a page where these views can be seen?
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi Martin,
Thank you for sharing the admin access, but, I'm getting the "Unknown username" message.
Can you please check the username and the password again?
I've set your next reply as private.
regards,
Waqar
Thank you for enabling the admin access.
I noticed that in the nested view "Awards – Awards of a Product", the code for the search filtering field from the parent view "Awards – Products" is repeated in the "Search and Pagination" section.
That code should only exist in the parent view, so you'll need to remove it from the child view's "Search and Pagination" section and only keep:
[wpv-filter-start hide="false"]
[wpv-filter-controls]
[/wpv-filter-controls]
[wpv-filter-end]
Thank you Waqar – you made my day!