• Hi

    I have a series of events that don’t require a date. They can be undertaken by a participant on any date at any start time.

    They do however have a time frame to complete it in once they begin.

    Can I override event dates/times when saving an event?

    I also have events that are date/time specific.

    I am a hobbyist WordPress user with little code knowledge but with instructions can dig in and implement things. I’m just getting my head around formatting pages using placemarkers and custom attributes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    When creating an Event, You could specify the Date on right side-bar. You also opt to to check the “All Day” to display the event as all day (ie: 24hours).

    Under Events > Settings > Formatting > Single Event page format, is the template file used for every event. You could remove the placeholder #_EVENTTIMES to remove the displaying of Event Time.

    There’s also a small snippet that is made by andy which is an EM enthusiast. https://github.com/andyplak/Events-Manager-TBC-Date Maybe further modifying this small snippet could help you on what you would need.

    Thread Starter Will Pom

    (@wi77p0m)

    Thanks for the reply timrv. Unfortunately as I have a lot of events that rely on a dates and times I can’t remove the #_EVENTTIMES.

    Tried the TBC plugin but although I get a check box on the admin page it has no effect on the front end.

    @wi77p0m,
    You could replace #_EVENTTIMES with a custom placeholder. In that placeholder you could put an if/else condition to show or hide the event times.

    Something among the lines of:

    function my_custom_eventtimes($replacement, $EM_Event, $placeholder) {
      if( $placeholder === "#_MYEVENTTIMES" ) {
        $replacement = $EM_Event->all_day = true ? null : $EM_Event->output("#_EVENTTIMES");
      }
      return $replacement;
    }
    add_filter('em_event_output_placeholder', 'my_custom_eventtimes', 10, 3);

    https://wp-events-plugin.com/tutorials/create-a-custom-placeholder-for-event-formatting/

    Thread Starter Will Pom

    (@wi77p0m)

    Thanks @duisterdenhaag
    I’ll look into that, may need to learn some code!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Override event date/time’ is closed to new replies.