Home Forums Event Espresso Premium No Events Shortcode?

No Events Shortcode?

Posted: September 15, 2021 at 10:39 am


September 15, 2021 at 10:39 am

Hello, does EE new version give the ability to have a message appear if no events are listed or if not listed in certain category?
Wondering where this is and what shortcode.


  • Support Staff

September 15, 2021 at 11:11 am

Hi there,

Which new version are you referring to, please?

If you are using EE4 with the [ESPRESSO_EVENTS] shortcode then it should automatically output your themes ‘content-none.php` template file when no events are found (if the theme has one).

If you have a shortcode in use on a page somewhere can you link me to that page so I can take a look?


September 17, 2021 at 7:12 am

can you please clarify?


September 17, 2021 at 7:20 am

please see here So this the code [ESPRESSO_EVENTS]

and this is the shortcode that has category but no event ..Nothings showing if there’s no event on category


  • Support Staff

September 20, 2021 at 4:23 am

OK, so yes that’s the standard event list shortcode and it uses your themes content-none.php as output for when nothing is found, which it looks like your theme does not have.

Looking at your site it looks like your using a custom theme with Elementor, are you creating the theme yourself?


October 6, 2021 at 8:32 pm

Support post that was closed – sorry for adding this post but still would like to review with staff. Thanks!

Reply to last message:
Theme is not custom. It is Astra theme. We didn’t see the content-none.php file. What do you suggest at this point?


  • Support Staff

October 7, 2021 at 4:11 am

Hi there,

Support threads automatically close if there is no activity, as there wasn’t a reply for 2 weeks and 2 days from my last reply it would have automatically closed, however, I’ve reopened it and merged your new thread into it.

Are you using the latest version of Astra?

Can you send me a copy of the theme so I can take a look?


October 7, 2021 at 7:40 am

do you have a template or code we can use? we are using latest Astra Version: 3.7.3 By Brainstorm Force


October 7, 2021 at 7:52 am

https://marjoriebrook seminars. com/test-non-events/

I used a blank category so it should have a text that says no events on this category but nothings show


  • Support Staff

October 7, 2021 at 9:23 am

Ok, so Astra does have a content-none.php template but it’s within /template-parts/ which EE doesn’t check for by default.

I can give you a function to display the default content-none.php template file but then within that is nothing event-specific, it looks like this:

So here is what I would do, first create a child them for Astra:

That allows you to copy template files into your child theme to be loaded.

Next, copy /template-parts/content-none.php into your child themes root directory.

Rename that copy to espresso_content-none.php

Add this function to your child theme:

Now you can edit that espresso_content-none.php template file to output whatever you prefer when EE events are not found.


October 12, 2021 at 7:43 am

can we customize it to say “no event shown”?


  • Support Staff

October 12, 2021 at 8:13 am

Yes, you change that espresso_content-none.php template file to output whatever you prefer.

At it’s most basic, you could have something like:

<section class="no-results not-found">
	<div class="page-content">
		<p>no event shown<p>
	</div><!-- .page-content -->
</section><!-- .no-results -->


October 14, 2021 at 7:59 pm

Thanks will give it a try


  • Support Staff

October 15, 2021 at 5:12 am

You’re most welcome.

The support post ‘No Events Shortcode?’ 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