© 2021 Greatives Hub - Powered by Greatives & Greatives Web

Events disappear on the event day (should be day after)

Landing Forums Somentra (Impeka) Bug Report Events disappear on the event day (should be day after)

  • Creator
    Topic
  • #6461
    Sinkadus
    Participant

    On our site the event disappear when the event the starts, instead of when it ends. The problem lies with the Impeka WPBakery Extension.

    In the file impeka-wpb-extension/templates/events.php there is this code snippet to exclude past events:

    if ( 'yes' == $exclude_past_events ) {
            $args['meta_query'] = array(
                    array(
                            'key' => '_EventStartDate',
                            'value' => date('Y-m-d H:i:s'),
                            'compare' => '>=',
                            'type' => 'DATE'
                    )
            );
    }

    The problem here is that _EventStartDate seems to contain just the date and not the time but the value it compares against includes time: date(‘Y-m-d H:i:s’). If you change value to: date(‘Y-m-d’) the issue is solved.

  • You must be logged in to reply to this topic.
Privacy Preferences

When you visit our website, it may store information through your browser from specific services, usually in the form of cookies. Here you can change your Privacy preferences. It is worth noting that blocking some types of cookies may impact your experience on our website and the services we are able to offer.

Our website uses cookies, mainly from 3rd party services. Define your Privacy Preferences and/or agree to our use of cookies.