Editing List View to show all events for Current Year + Upcoming Year

Home Forums Calendar Products Events Calendar PRO Editing List View to show all events for Current Year + Upcoming Year

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #956913
    simoncarr
    Participant

    I have a site with a long listing of events.. nearly 150!

    Most events are this year (2015), but I’d like to limit the default list of events to ONLY 2015, and then have a link to a page to shows only events for 2016.

    I’m not sure if this would be done in loop.php or single-event.php. Any insight into how to filter the event list would be very helpful!

    thanks.

    #957036
    Brian
    Member

    Hello,

    The loop.php is to late to change the query. That just outputs the information.

    My response is pretty much what Barry also mentioned here:

    Customize List View to be separated by Month

    You can try using pre_get_posts to change the query of the list view:

    https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

    And use this conditionals to target the list view:

    https://gist.github.com/jo-snips/2415009

    Beyond that there is not much else we can provide, but I can try to help out.

    Thanks

    #969576
    Brian
    Member

    I am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Editing List View to show all events for Current Year + Upcoming Year’ is closed to new replies.