• Resolved zdevine

    (@zdevine)


    Under the Date and Time section a @ is used to separate the start and end time of the event.

    11:30AM @ 01:00PM

    It should read as

    11:30AM to 01:00pm

    How can I change this specific thing at the template level so all my events read correctly?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @zdevine,

    You can date time separator by overriding template file called content-single-event_listing.php to your theme side by following this doc.

    Once you have overrided the template file please find the

    <div class="wpem-event-date-time" >
    	            <span class="wpem-event-date-time-text" itemprop="startDate" content="<?php echo $start_date;?>"><?php display_event_start_date();?> <?php if(get_event_start_time()){ display_date_time_separator(); ?> <?php display_event_start_time(); }?></span>
    	            <br/>
    	            <span class="wpem-event-date-time-text" itemprop="endDate" content="<?php echo $end_date;?>">
    	            <?php if( get_event_start_date() != get_event_end_date() ) {  display_event_end_date(); } ?>
    	            <?php if(get_event_end_time()){ display_date_time_separator() ?> <?php display_event_end_time(); } ?>
    	            </span>
                </div>

    Thank you

    Thread Starter zdevine

    (@zdevine)

    I’ve copied the template but what do I do exactly to change the separator from a @ to “to” so it makes more sense on the frontend events page?

    { display_date_time_separator() ?>

    Do I change this in some way?

    Hi @zdevine

    Yes, remove the display separator and replace with _e('to','wp-event-manager');

    Thank you

    Thread Starter zdevine

    (@zdevine)

    Sorry, I’m not well versed in PHP.

    Can you tell me how I’m supposed to change the code exactly in the new template file I’ve created?

    Just replacing { display_date_time_separator() ?> with _e(‘to’,’wp-event-manager’); didn’t work.

    <div class=”wpem-event-date-time” >
    <span class=”wpem-event-date-time-text” itemprop=”startDate” content=”<?php echo $start_date;?>”><?php display_event_start_date();?> <?php if(get_event_start_time()){ display_date_time_separator(); ?> <?php display_event_start_time(); }?></span>
    <br/>
    <span class=”wpem-event-date-time-text” itemprop=”endDate” content=”<?php echo $end_date;?>”>
    <?php if( get_event_start_date() != get_event_end_date() ) { display_event_end_date(); } ?>
    <?php if(get_event_end_time()){ display_date_time_separator() ?> <?php display_event_end_time(); } ?>
    </span>
    </div>

    Hi @zdevine
    Please update your template code with below code:

    <div class=”wpem-event-date-time” >
    <span class=”wpem-event-date-time-text” itemprop=”startDate” content=”<?php echo $start_date;?>”><?php display_event_start_date();?> <?php if(get_event_start_time()){  ?> <?php display_event_start_time(); }?></span>
    <br/>
    <span class=”wpem-event-date-time-text” itemprop=”endDate” content=”<?php echo $end_date;?>”>
    <?php if( get_event_start_date() != get_event_end_date() ) { display_event_end_date(); } ?>
    <?php if(get_event_end_time()){  ?> <?php display_event_end_time(); } ?>
    </span>
    </div>
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Start and End Time separator’ is closed to new replies.