I would like to know how to create an alternative version of the table on this page
hidden link
that can be toggled on/off OR shown on another page to display all institutions (parents) or only those with at least 1 policy (child). This way if the table has 5,000+ institutions (parents) they can be viewed as shown currently, but as most of them will not have policies (children) initially, a shortened display of the table could be viewed showing only those with policies posted.
Thanks!
Dear JS,
I assume we area talking about this case:
Patent post type "institutions"
-- Child post type "policies".
You are going to setup a view, list "institutions" posts, display "institutions" posts if there is child "policies" posts.
There isn't such a built in feature within Views, as a workaround, you can create a nested view:
1) Parent view display "institutions" posts, and display below child view
2) Child view display "policies" posts,
a) filter by:
Post relationship filter
Select posts that are a children of the current post in the loop.
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
b) if there is any result, display the parent "institutions" information:
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/