Events Manager
[resolved] Change default start/end times (6 posts)

  1. kassieloo
    Posted 3 years ago #

    On the user-submitted form (and in the WP admin) the start time is 12:00 am and 11:30 pm. I'd like to change them to be 7:00 am and 8:00 pm. Is this possible?


  2. agelonwl
    Posted 3 years ago #

    yes, that's possible. you need to modify this templates

    - wp-content/plugins/events-manager/templates/forms/event/when-with-recurring.php
    - wp-content/plugins/events-manager/templates/forms/event/when.php
    - wp-content/plugins/events-manager/templates/forms/event/recurring-when.php

    then add new conditions on event_start_time and event_end_time value field

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

  3. kassieloo
    Posted 3 years ago #

    How do I "add new conditionals on event_start_time and event_end time value fields"?

    I've already moved the files as directed to use templates, but I'm not sure how to do above.

    Thanks in advance!

  4. agelonwl
    Posted 3 years ago #

    something like

    <?php echo date( $hours_format, ( !empty($EM_Event->start) ? $EM_Event->start:'07:30'  ) ); ?>
  5. kassieloo
    Posted 3 years ago #

    No combination of this is working, and at one point, if I didn't put a time down for an event, it would put it at 7:30.

    Essentially, I need to create blackout times. Office is open from 10-6, you don't want people scheduling things at 7.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    you need to change these bits so that you have a default time if not set:

    name="event_start_time" value="<?php echo date( $hours_format, $EM_Event->start ); ?>"

    another alternative is hooking into the em_event action and change $EM_Event->start and $EM_Event->event_start_time if it's a new event (meaning no $EM_Event->event_id).

    You'd need some php experience to do any of the above really... but maybe changing angelonwl's snippet to this may help:

    <?php echo date( $hours_format, ( !empty($EM_Event->start) ? $EM_Event->start:'07:30' ) ); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.