Events Manager
[resolved] my-bookings.php - Show Future Bookings Only (2 posts)

  1. bisrael
    Posted 3 years ago #

    I'm trying to use the my-bookings page to list a user's bookings but I only want to show upcoming events, not everything the user has booked.

    Can someone offer advice on how to add a 'future-events' filter to my-booking.php or show how to use a events_list short_code to list the current user's future bookings?

    Thanks in advance

    B Israel
    London, Ontario


  2. agelonwl
    Posted 3 years ago #

    you can edit template file templates/my-bookings.php then add this snippet

    $todays_date = date("Y-m-d");
    $today = strtotime($todays_date);

    above if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0)

    then change that if condition to

    if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) && ($EM_Event->start >= $today) ) {


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic