• I have created my own template for the event-single.php which is for Single events. I was able to get everything including the image, event dates, time, place etc. Then I have my own html and php.

    However I cannot get the booking form to show because I don’t know how to GET it with php. Is there some kind of function like get_booking_form() that the plugin uses. I am not using the template for single events which just has the ‘echo $EM_Event->output_single();’ so none of the things done in the admin will work.

    I see there is a placeholder #_BOOKINGFORM but if you put this in a php file on your theme event manger template overrride then it will just show #_BOOKINGFORM. Can I output those placeholders using php? so that the form would show.

    Please help. I’m good at php so either how to get the form and where can I find more functions like that. Or can I use php to output the placeholder in my theme. Something that would be probably like <?php event_output( #_BOOKINGFORM )?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • You should be able to do something like:

    do_shortcode('[event]#_BOOKINGFORM[/event]');

    Thread Starter ZC Web

    (@zc-web)

    Actually Marcus said do this and it will work
    echo $EM_Event->output('#_BOOKINGFORM');
    make sure that global $EM_Event is before

    Now I just need to do a conditonal. If bookings are enabled. I did a print_r of the $EM_Event object and did not see a boolean for if the event has or doesn’t have a booking form. something like

    if (has_booking) {
    … show booking form
    } else {
    show nothing
    }

    I’m pretty sure you can use EM_Event->output for that as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Booking form on Custom Event’ is closed to new replies.