Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created December 16, 2014 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/117cb5c8a3b4e6a9deb1 to your computer and use it in GitHub Desktop.
Save lorenzocaum/117cb5c8a3b4e6a9deb1 to your computer and use it in GitHub Desktop.
How to hide specific events from the event listing page in Event Espresso 4

The events tag feature can be combined with a line of CSS to hide select events on the event listing page in Event Espresso 4. The event listing page on a default install of Event Espresso 4 will be:

example.com/events/

  1. First, decide on an event tag that will be used. For this tutorial we will go with a tag of "pending."

  2. Go to each event using the event editor and add your tag (e.g. pending) and save changes. Be sure to repeat this process for each event that you would like to temporarily hide.

  3. Add the following CSS to your child theme's CSS or through a plugin like Reaktiv CSS Builder or My Custom CSS:

.type-espresso_events.nameoftag {display: none;}

Then update "nameoftag" to your actual tag. For this example, we have selected "pending". Here is that line of CSS after it has been updated:

.type-espresso_events.pending {display: none;}

Now go to your events listing page and refresh the page. You should see that your events with your tag (e.g. pending) are now gone.

They can be easily restored by going to an event using the event editor and removing the specific tag and saving changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment