Christophe Rocour

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Christophe Rocour
    Participant

    This reply is private.

    Christophe Rocour
    Participant

    THANK YOU Cliff, this works like a charm! Now I get the results I expect!

    I will explain my license issue in a private reply hereafter.

    Christophe Rocour
    Participant

    I’m so sorry that my English is too bad to explain clearly what my question is. I will try one final time.

    Our website is http://foto-agenda.nl . It’s a website where photo exhibitions are listed. These exhibitions are the events. They start on a different date than they end. Start time and end time are not relevant and not in use.

    On my testpage I’m trying to show a list of all events that will have their start date set to today or in the future. So NOT events that started on month ago and are still going on because they end in the future, only the events that have their first date (what I call their start date) today or later.
    I am using a slightly altered version of this example I found in your knowledge base:

    
    // Retrieve the next 5 upcoming events
    $events = tribe_get_events( array(
     'posts_per_page' => 5,
     'start_date' => date( 'Y-m-d H:i:s' )
     ) );
    

    My version:

    
    // Retrieve all events that have set their start date today or later
    $now_amsterdam = new DateTime( 'now', new DateTimeZone( 'Europe/Amsterdam' ) );
    $aEvents = tribe_get_events( array( 
    'start_date' => $now_amsterdam, 
    'posts_per_page' => -1 
    ) );
    

    But as you can see on the testpage there are events listed that have their start date in the past and THAT is what I don’t understand. Why does this query give me events that start in the past while I expect that I only would get events that start today or later?

    Could it be that an event that started in the past and has its end date in the future, is considered as having a start date today? Is that the logic behind the (for me) unexpected results? And if so, how do I filter out events that have their first start date set in the past?

    I hope I explained it more clearly now, thank you for your patience!

    Christophe Rocour
    Participant

    I know that I have to figure out my own custom coding but through this post I am trying to understand how the events calendar ‘calculates’ the start date in events that span multiple days (like the events on our site).

    I’m using the example found in your knowledge base but I’m also getting events that have already started in the past instead of only the ones that will start today and in the future as I would expect. I don’t understand that (see my initial post). If you could just point to the part of the documentation where the start_date is explained, it would be very helpful and I will work the custom coding out myself.

    Christophe Rocour
    Participant

    Hi Cliff, this is sabinevi from another account since the license of EC of my own account was not continued by the customer whom I bought it for.

    I changed the date to

    
    $now_amsterdam->format( 'Y-m-d H:i:s' )
    

    but that didn’t solve it for me. Any other thoughts on this subject?

    in reply to: Admin slow after latest upgrade Events Calendar PRO #1478658
    Christophe Rocour
    Participant

    Great, it works again like it did before.
    Thanks for the swift solution!

Viewing 6 posts - 1 through 6 (of 6 total)