WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bisrael
    Member
    Posted 1 year 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

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year 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) ) {

    http://wp-events-plugin.com/documentation/using-template-files/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic