Display on event page 'this event occurs on the third friday' etc

WordPress Event Management, Calendars & Registration Forums General Question Display on event page 'this event occurs on the third friday' etc

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 9 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15723

    Hi there – I want to add a line to the event details on the event-meta-event-single.php template to display the recurrence of the event eg ‘This event occurs on the third friday of the month’ etc. Could you let me know how to do that? I’m pretty much a PHP newbie so apologies in advance for my ignorance!

    I’ve isolated the following code as the bit that needs editing – I’m just not sure what to replace it with!

    <!– Is event recurring or a single event –> <?php if(
    eo_reoccurs() ):?> <!– Event reoccurs – is there a next
    > occurrence? –> <?php $next =
    eo_get_next_occurrence($date_format);?>

          <?php if($next): ?>
              <!-- If the event is occurring again in the future, display the date -->
              <?php printf('

    '.__('This event is running from %1$s until %2$s. It is next occurring on %3$s','eventorganiser').'.

    ', > eo_get_schedule_start('j F Y'), eo_get_schedule_last('j F Y'), > $next);?> <?php else: ?> <!-- Otherwise the event has finished (no more occurrences) --> <?php printf('

    '.__('This event finished on %s','eventorganiser').'.

    ', eo_get_schedule_last('d F Y',''));?> <?php endif; ?> <?php endif; ?>
    alex parsonage
    #15730

    Hi alex,

    You could use:

     <?php echo eo_get_schedule_summary( get_the_ID() ); ?>
    

    That displays the occurrence has it appears in the events admin calendar. If that’s not appropriate you could copy that function, giving it a new name and modify it as required (it is defined in event-organiser/includes/event-organiser-event-functions.php

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.