I want to create a view that shows how many "Setlists" a "Chart" is used in over a period of time.
"Setlists" and "Charts" are both CPTs. They are in a relationship through an intermediary post type "Charts Setlists." The Setlist CPT uses a required custom date field—this is what I want to use for the date range filtering.
The very basic idea is to display each result in a row where the Chart name is on the left and the quantity (#) of Setlists that Chart has been connected to is on the right. Example:
Song Name One 3 (number of Setlists this Chart is attached)
Song Name Two 7
Song Name Three 4
I've been able to find ways to display this info using one view for Setlists with [wpv-items-count] inserted into another view for Songs, but then the date filter doesn't work because the date filter is connected to Setlists.
Anyway, I hope I've explained this well, and am hoping there is a solution. If you need more from me please let me know.
Hello. Thank you for contacting the Toolset support.
The thing is that, you can filter the view using custom fields that is associated with post type you set to query your view. Having said that, if you set your view to query post type Songs, you can add frontend filters/custom search filters for the custom fields that should belongs to post type Songs.
There is no way to filter the view using custom field that is part of another post type as it will give you unexpected results and its not recomonded.
The workaround would be to copy the date field to your song post type by adding a new date custom field to your song post type and then add the date filter.