Support

Home Forums Event Espresso Premium All-Day Event toggle on/off

All-Day Event toggle on/off

Posted: January 10, 2016 at 11:26 am


afcco

January 10, 2016 at 11:26 am

I noticed in the forum a post back on July 13, 2014 titles “All Day Event – Remove start and End Times

In it, you gave some php code to remove the times display. You mention later in that post string that if we wanted to be able to toggle the all day function on/off for each event to let you know.

Is that something that can be done?

I’m running EE4 on WordPress 4.4.1 With the calendar, mailchimp, user integration, and stripe add-ons. http://www.afccontario.com/espresso (Espresso isn’t visible to end users unless they have this link) Hoping to go live tomorrow (Jan 11, 2016)

This client has various categories of events, some events require a time and some don’t. Some, like conferences are all-day events over a few days. I’d like to NOT display a time on any screen for those events. Is there a way to have an All-Day event toggle on the ‘Create An Event’ screen that when checked, hides all reference to event times.

Thanks.


Josh

  • Support Staff

January 11, 2016 at 11:12 am

Hi Lorne,

You can add a toggle in the event editor by installing the Advanced Custom Fields plugin. Once installed, you set up the custom field to appear in the editor for espresso_events. A true/false field would be a good option:
http://www.advancedcustomfields.com/resources/true-false/

Then in the template code, you wrap the code that displays the times in an if statement that checks for your custom field value.


afcco

January 12, 2016 at 8:50 am

Thanks Josh,

I’ll give that a try. You mention template code…on what page am I looking. I’m presently NOT using a custom template.


Josh

  • Support Staff

January 12, 2016 at 9:05 am

It’s the template code referenced in the other thread that you mentioned earlier.

https://eventespresso.com/topic/all-day-event-remove-start-or-end-times/#post-106973

The support post ‘All-Day Event toggle on/off’ 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