• Resolved smith37

    (@smith37)


    Hi. I want to hide the end times from display on the event single page and event listing. Can this be done? If I try to save blank, without an end time, it will default to 11:59.

    I’ve tried the #_12HSTARTTIME placeholder, but this still shows the start time if the All Day box is checked – I want to use the ‘All day’ function to display the message ‘TBC’ if we don’t yet have a start time.

    Is there any way around this or am I best to use custom fields and hide the time displays altogether?

Viewing 1 replies (of 1 total)
  • Add the following code snippet so that #_12HSTARTTIME will not display the start time if the “All Day” setting is selected.

    add_filter('em_event_output_placeholder','my_em_styles_placeholders',1,3);
    function my_em_styles_placeholders($replace, $EM_Event, $result){
        switch ( $result ) {
            case '#_12HSTARTTIME':
                $replace = $EM_Event->event_all_day ?  "" : $this->start()->format('g:i A');
                break;
        }
        return $replace;
    }

    You can use the Code Snippets plugin to add this code snippet.

Viewing 1 replies (of 1 total)
  • The topic ‘Hiding end time’ is closed to new replies.