• Hi there,

    When I do a search on my site, I wan’t to show all pages, and future events,

    On my search page I made eventorganiser_is_event_query function return true using the eventorganiser_is_event_query filter. After that I set the showpastevents query var to false. Now my problem is that because event organiser adds SQL into the ‘WHERE’ clause, if no events are found, it also stops any of my pages being found as well.

    I know it’s a bit of a custom problem, just thought i’d ask to see if there are any easier ideas, i’l probably end up adding the event organiser stuff to a second query after checking if any events were actually found.

    Thanks – Andy

    https://www.ads-software.com/plugins/event-organiser/

Viewing 1 replies (of 1 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Hi Andy,

    Yes unfortunately an ‘event query’ cannot include other post types. You can include events in a page/post search (but not subject to date-based queries, as page/posts will obviously not satisfy them ?? ).

    There maybe changes in the future to allow this sort of thing, but currently it’s not possible.

Viewing 1 replies (of 1 total)
  • The topic ‘How to not show past events in wordpress search results’ is closed to new replies.