I am trying to use the Views shortcode to display filtered results. The query filter I am using is for an events calendar where events are hosted by one of two parties.
I want the calendar to show any events with the custom field Event End Date greater or equal to today (i.e. don't show past events) - this part I have working correctly. (See query-setup.png)
I also want to show events hosted by members and events hosted by the company on different pages, so I set up another filter where the custom field Event Host is equal to the shortcode parameter "host". In the shortcode I'll use
to show the company results, as this is what this field saves to the database. (See database-event-host.png).
When I use the shortcode this way, it displays no results.
However, when I modify the query filter so that the event host field is equal to a constant of "WVAC Event", and remove the host parameter from the shortcode, it shows the events correctly.
I don't want to use the constant since that would then require an additional view for the member events. Since the layout will be identical between the two types of events I really want to avoid creating the second view. Using the constant seems to verify that the correct value is being used, but for some reason the shortcode will not use the value set in "host" correctly.
From your description and screenshots everything seems configured correctly,
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Thanks for your time with this issue. After taking another look at it, I realized what went wrong.
Originally, all events were going to be shown on the same calendar with an image indicating whether they were member events or the company's events. Since it was all on the same page, I made an archive page for this CPT.
When we decided to break the events into two separate pages I accidentally created a second archive page for the same post type, which caused the original archive page to stop being used for that CPT. This made it look like there were no results that matched the date/event type criteria when in reality there were plenty that should have shown up.
The fix was simple in case anyone else has this issue.
Put the view shortcode on two separate WordPress pages and remove the archive page as it is no longer needed.