Default calendar search listing to exclude past events

WordPress Event Management, Calendars & Registration Forums General Question Default calendar search listing to exclude past events

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 9 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16101

    Currently when you go to the calendar listings page on our site (http://janeboyd.org/calendar/) it only shows current and future events. I have currently unselected the “Show Past Events” box on the settings tab on the admin side for this reason. However, I would like people to be able to search past events, which is not possible. Is there something I can do to the below code on the page that generates the calendar search plugin in the first place that would enable the default results when you navigate to the page to be only current and future events, but enable the end-user to search past events?

    [event_search filters=”event_category,event_venue,date”]

    Anna Patty
    #16104

    Yes, this isn’t yet mentioned in the documentation but you can pre-set the query for events using any of the query attributes supported by [eo_events]. In particular you can use the showpastevents attribute:

     [event_search showpastevents=true]
    
    Stephen Harris
    #16105

    That doesn’t seem to be fixing the problem. I WANT the default listing when you go to the calendar page on our website to ONLY show current and future events. At the same time, I would like people to be able to SEARCH past events, which is not possible.

    How would I need to modify the below code to make this possible?

    [event_search filters=”event_category,event_venue,date”]

    Anna Patty
    #16106

    You could do

    [event_search showpastevents=true event_start_after="now"]
    
    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.