I want to display a message if the event is expired or inactive otherwise show the next dates available. The following code gives an error if there are active dates:
<?php
if( !$post->EE_Event->is_expired() ) {
echo “*This event is currently not scheduled”;
}
else {
espresso_get_template_part( ‘content’, ‘espresso_events-datetimes’ );
UPDATE: I figured it out. Here’s what I did, I changed the status to “Pending Review” which says what I want, “There are no upcoming dates for this event.”
Hi Lorenzo, I am ready to roll out our upgrade from EE3 to EE4. The customizations took me a little longer since I am not a developer, but I am pleased and the datetime feature is exactly what the client requested. Thanks for the awesome support!
Viewing 3 reply threads
The support post ‘Show Date | times wihen active only’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.