Support

Home Forums Event Espresso Premium EE4 and Event Dates

EE4 and Event Dates

Posted: January 14, 2015 at 10:41 pm

Viewing 1 reply thread


Chris Bouse

January 14, 2015 at 10:41 pm

May I please request a simple way to remove the date from an event? We would like to add a list of upcoming events on our page that have not been finalized as far as venue, date and time. Can we maybe just get a box that says to ignore the date and time?

We want to advertise that the events will be coming but a lot of times the venue, date and time are not available until later in the process.

Thank you


Dean

January 15, 2015 at 5:45 am

Hi Chris,

OK, so there isn’t a simple way to remove the date from an event, but I do have a way if you don’t mind a little bit of PHP.

First, what I would do is set up the new upcoming events with their own category (in this example it will be ‘upcoming’).

Then I would list the events with this shortcode:

[ESPRESSO_EVENTS css_class=”upcomingevents” category_slug=”upcoming”]

(the above shortcode is not strictly necessary but is a good way to separate upcoming events from the rest of them).

Then create a Site Specific custom functions plugin (see here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ )

In that plugin add:

function remove_upcoming_dates( $html, $datetime ) {

  //change upcoming to the category slug of your choice
  if( !has_term( 'upcoming', 'espresso_event_categories' ) ) { return $html; }

  $html = '';
  return $html;

}
add_filter('FHEE__espresso_list_of_event_dates__datetime_html', 'remove_upcoming_dates', 1000, 2);

What this does is look for all events with the category ‘upcoming’ and removes mention of datetimes.

I would also hide the Ticket Selector for each event as you create it.

This means when you come to actively promote the event, you need to do two things: remove the category and turn the ticket selector back on.

Viewing 1 reply thread

The support post ‘EE4 and Event Dates’ 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