stephenharris/Event-Organiser

Fixes bug with cross-post-type queries

stephenharris opened this issue · 1 comments

Changes made in #58 meant only events are returned in cross-post-type queries. See http://wordpress.org/support/topic/tag-archive-pages-showing-no-content-or-only-partial-content?replies=3

To summarise introducing date queries in cross-post-type queries caused major issues. I'm in effect reversing most of the changes made in #58.

In particular:

  • Event-Date parameters are not available in cross-post-type queries. This includes taxonomies which are registered for events and another post type.
  • Taxonomy queries for event-only-taxonomies should be considered 'event only' and so normal date queries and the api functions should behave as expected. This one of the few changes in #58 to survive.
  • You can make a query 'event only' by specifying 'event' as the post type.

In cross-post-type queries, such as searches over several post types - you can still use the event functions API. But keep in mind that only the event ID (not occurrence ID) is available to you. You should view this event as something akin to a post. You can display the date of the first, next last, or even current occurrence using the available API. Venues and category information too (as this is not occurrence specific).