I'm trying to query a view with 2 post types (standard posts and a custom one called "events")
I want all the posts to show and ONLY the events with dates in the future. I can't seem to figure out how to set a query for that?
Screenshot of the dashboard I'm using. I would like the query to be something like:
the field start date and time is a number greater than or equal to today OR field start date is empty (posts don't have a start date).
however, once I choose the start date, it won't let me choose it again, so I tried adding another field that is required if it's an event (location) but it's forcing and AND between the two queries and I think it would work if it was an OR.
How can I accomplish this?
I tried using the shortcode in the loop editor, but it still reserves a spot for the event it just shows an empty post.
Hello. Thank you for contacting the Toolset support.
Can you confirm you want to display posts belongs to both post types "post" and "Events" both have the custom "State date and time" field is assigned?
And you want to also fetch posts where start date is future date or start date is not set - is that correct? if yes:
In that case we might have to use the view's filter hook "wpv_filter_query" but I will have to look at your current structure. Can you please share problem URL where you are trying to display the view as well as admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.