Support

Home Forums Event Espresso Premium Upcoming Events Widget Message

Upcoming Events Widget Message

Posted: July 22, 2021 at 3:38 pm

Viewing 3 reply threads


AckermanInstitute

July 22, 2021 at 3:38 pm

We’re using the Upcoming Events Widget to display events from a selected category. If there are no upcoming events in that category, is there a way to add a message to say something like, “No upcoming events”?


Tony

  • Support Staff

July 28, 2021 at 8:50 am

Hi there,

It is possible but we don’t have anything within the default widget to do it.

Are you comfortable with PHP?

What you can is using something like this:

https://gist.github.com/joshfeck/27a285c4285a6c986053

Which is basically a copy of the default upcoming events widget but using that means you can change the code to output whatever you prefer.

Line 382 needs to be changed to something like:


} else {
    echo '<p>No upcoming events</p>';
}

Does that help?


AckermanInstitute

July 30, 2021 at 1:54 pm

Hi,

This worked exactly as needed. Thanks so much for your help, much appreciated!


Tony

  • Support Staff

August 2, 2021 at 3:16 am

You’re most welcome.

Any further issues/questions just let us know.

Viewing 3 reply threads

The support post ‘Upcoming Events Widget Message’ 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