Hi,
I'm trying to create a view that will contain queries that I'm not able to achieve, maybe you can assist me with doing so?
I want to include multiple taxonomy terms in the filter and have a specific field filtered affect a specific taxonomy term rather than all terms.
For examples:
1. Include in the Query filter of a single view both the term 'Events' and the term 'News'.
2. Add an additional query filter that will filter only the terms events with the field 'Event Date' being equal or greater than Today.
I tried it out but no posts are retrieved. Is this possible?
Please see a screenshot for the example.
Thanks!
Amir.
Hi, I understand you would like to add a custom field filter to a View that also includes a taxonomy term filter. You would only like to apply that custom field filter when one specific term is applied to the post. This type of complex Query Filter organization isn't possible in one View in wp-admin, but it's possible with custom code. I may be able to provide a workaround that requires no custom code, but combines the results of two Views. Can you provide a bit more information?
- What happens if both "Events" and "News" terms are applied to the same post? Should the custom field filter be applied in this case?
- Is the Event Date field a Types date field, or some other field type?
- Is the Event Date field a required field for all these posts?
- If it is not required, any post that does not include a value for this field will be excluded from the results in this View - that's probably why you are seeing no results. The workaround I have in mind will help solve this problem.