Home Forums Event Espresso Premium Upcoming Events Widget Message

Upcoming Events Widget Message

Posted: July 22, 2021 at 3:38 pm


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”?


  • 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:

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?


July 30, 2021 at 1:54 pm


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


  • Support Staff

August 2, 2021 at 3:16 am

You’re most welcome.

Any further issues/questions just let us know.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso