1. Say I have a Custom post type sportsevents
2. I have a custom taxonomy with tv channels
So each sportevent has a tv channel taxonomy term
Now I make a taxonomy view with tv channels and a sportevents view with Select posts with taxonomy: tv-channels set by the parent Taxonomy View. And I set event time custom field to: is a number between TODAY(), FUTURE_DAY(1).
So I do the Post View inside a Taxonomy View
I get sportevents grouped by tv channel for today and that is great. But some tv channels will not be in use every day but they stil show up in the view output with No results found message which I could remove of course.
But is it somehow possible to contruct something so I can get a taxonomy view with only the tv channels that are actually in use in the sportevents view?
The tricky part is that you add a date query filter to your child View so the parent View can't know whether the child View has any results or not.
I think what you need is to not output the TV channel in the parent taxonomy View, which should output nothing at all, and simply contain the child View in its output section.
Then in the child post View, you output the events in the loop, but just before the loop itself, after the wpv-items-found shortcode, output the taxonomy to generate the TV channel name. (I think wpv-post-taxonomy should work in this context.)
Do you want to try that and let me know if you run into any pitfalls?
Thanks for your suggestion maybe I will give that a go.
I came up with a CSS way on my own by having the div set in taxonomy channel view like this <div class="row_cell [wpv-taxonomy-slug]"> and display:none for this in the css then in the Post View inside the loop I do <style>
.row_cell.[wpv-post-taxonomy type="tv-channels" format="slug"] {
display: block;
}
</style>