Support

Home Forums Event Espresso Premium $post->EE_Event->is_active(); returns false on upcoming event

$post->EE_Event->is_active(); returns false on upcoming event

Posted: May 22, 2018 at 8:31 pm

Viewing 1 reply thread


REAIE

May 22, 2018 at 8:31 pm

I have a single-espresso_events.php template which is very simple however when I use $post->EE_Event->is_active(); it returns false on active and upcoming events? I’m checking the value just after get_header();


Tony

  • Support Staff

May 23, 2018 at 3:38 am

Hi there,

is_active() should only return true if the event is active (as in right now is between the datetime event start and end), it is expected that it returns false for ‘upcoming’ events, as an upcoming event is not an active event.

Can you post a screenshot of your event editor showing the datetime section, please?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Viewing 1 reply thread

The support post ‘$post->EE_Event->is_active(); returns false on upcoming event’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso