• Resolved oksanaar

    (@oksanaar)


    Hello,

    First – thanks a lot for a wonderful plugin! I love how simple and yet complex in its functionality it is.

    Second – I have created single-event.php file to override the template. It used to show all event information wonderfully. However, as I added more events event dates and booking form appear on some pages and don’t appear on some.

    Here’s the page where it all appears:
    https://www.activeukraine.com/trips-calendar/testing/

    and

    https://www.activeukraine.com/trips-calendar/polissya-bike-marathon-020606/

    And here it doesn’t appear:
    https://www.activeukraine.com/trips-calendar/culinary-masterclass-0105/

    Everything is exactly the same for all events, so I don’t think it is plugin or theme conflict.

    Here’s how I output the date in the .php file:

    <div class=”event-date”>
    <p> <?php echo do_shortcode(‘[event]#_EVENTDATES[/event]’); ?></p>
    </div>

    <div class=”event-booking-form”>
    <?php echo do_shortcode(‘[event]#_BOOKINGFORM[/event]’); ?>
    </div>

    </div>

    I am not an IT guy/girl, so my knowledge of php is limited. I understood that I can pull the event dates and booking form via em_smth_smth. I’ve been browsing through your documentation and plugin files and can’t figure it out.

    I’d be really grateful if you could help me with the correct way to insert it in php.

    Thanks a bunch from Ukraine!
    Oksana

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try something like this in your single-event.php

    
    <?php
    global $post;
    $EM_Event = em_get_event($post->ID, 'post_id'); 
    
    echo $EM_Event->output('#_EVENTNAME');
    echo $EM_Event->output('#_EVENTDATES');
    echo $EM_Event->output('#_EVENTTIMES');
    ?>
    
    Thread Starter oksanaar

    (@oksanaar)

    Thanks! It worked actually – it shows the event name and date, but it says that online bookings are not available.
    https://www.activeukraine.com/trips-calendar/culinary-masterclass-0105/
    Which is strange because I enabled registration for the event and created stardard ticket for it like for the others.

    What can be the issue?

    Thanks

    Do you have tickets set up that haven’t gone beyond the booking cut-off date?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Event’s date displays on some events and doesn’t display on others’ is closed to new replies.