Support

Home Forums Event Espresso Premium All day event – remove start or end times

All day event – remove start or end times

Posted: July 13, 2014 at 6:52 pm


Karen Carps

July 13, 2014 at 6:52 pm

I have searched and searched the forums and haven’t found an answer to this. This is a new installation of EE4, running the latest version of wordpress. Is it possible at all to create an event that is all day without indicating start and end times? The client is a travel agency that advertises tours well in advance, and they often don’t have a departure time set when they make the tour available. target=”_blank”>Here’s the event in questiion.


Josh

  • Support Staff

July 14, 2014 at 10:11 am

Hi Karen,

It is possible to display events events without displaying the start and end times. The following steps require a bit of PHP modification, but the modifications can be placed in a little plugin kept separate from the main Event Espresso plugin so they will not be overwritten on an update:

1) Copy the following function into your child theme’s functions.php file or into your own custom functionality plugin:

2) You’ll note that this is a pluggable function that’s overriding the function that’s normally declared in /plugins/event-espresso/core/helpers/EEH_Event_View.helper.php. There is a single edit that’s been made, the code that displays the event’s time has been commented out like so:

// $html .= '
' . $datetime->time_range( $tm_frmt );

3) You can optionally add a bit of CSS to hide the time column from the “Show more details section of the ticket selector:

.tckt-slctr-tkt-datetimes-sctn .tckt-slctr-tkt-details-tbl td:nth-of-type(2),
.tckt-slctr-tkt-datetimes-sctn .tckt-slctr-tkt-details-tbl th:nth-of-type(2) {

display:none;

}

If you need to make the dates display for some events let us know and we can show you how to add a “Show dates” option in the editor that can be toggled on and off.


Karen Carps

July 14, 2014 at 12:49 pm

Beautiful… worked just like I wanted it to. Dates are still listed without times. Have a wonderful day!

The support post ‘All day event – remove start or end times’ 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