Support

Home Forums Event Espresso Premium Hide a single event from the calendar

Hide a single event from the calendar

Posted: December 10, 2021 at 11:32 am

Viewing 1 reply thread


nafujiwara

December 10, 2021 at 11:32 am

I would like to hide a single event from the calendar, it is still an ongoing public event, I just want it hidden from view on the calendar. I’m using EE4. I am aware that you can choose to only display certain event IDs but I already have months worth of events that don’t have IDs assigned, It would be much easier to just exclude this one event, how to I go about this?
Thanks!


Tony

  • Support Staff

December 15, 2021 at 4:35 am

Hi there,

Do you load all events within the calendar currently or are you loading a specific category?

The reason I ask is the simplest method for this is to add a new category, it can be called whatever you want but let’s say its ‘private-events’ for this example.

Add any events you don’t want showing on the calendar to the category and then use a snippet of code like this:

https://gist.github.com/joshfeck/cb2c0c00e15dbbd3489e35187722a402

To exclude the category from the calendar.

You will need to update Line 33 to use the correct ID for your category and then you can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Note that the above will only work if you are NOT already setting a category (or multiple categories) on the shortcode itself.

Viewing 1 reply thread

The support post ‘Hide a single event from the calendar’ 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