Custom Templates & Booking Form

This topic contains 5 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7888

    Hi – great plugin!

    I’m trying to roll this out quickly for a client who wants a custom single-event page. I’ve set up my own copy in the current theme folder and everything is fine except I can’t see how you are calling the booking form after the content.

    Essentially we want to move the meta details (date, map, etc…) to after the main post content but BEFORE the booking form ……. help?

    Michael Waugaman
    #7891

    Hi Michael,

    Glad you like the plug-in. By default (for improved theme compatibility) event meta data is prepended to the event content. However if you create a single-event.php template in your theme, it will use that instead. So I’d recommend making a copy of single.php in your theme and then immediately after it displays the main content, add the following:

    <?php eo_get_template_part('event-meta','event-single'); ?>

    to display the event meta day (or completely customise how event-related details appear by using the available functions). At this point the booking form is still automatically appended to the content, so to stop that add the following to your functions.php:

     add_filter( 'eventorganiser_pro_get_option_disable_automatic_form', '__return_true' );

    Then add

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

    wherever you want the booking form to appear in single-event.php (e.g. immediately after eo_get_template_part... above.

    Stephen Harris
    #7892

    That’s great, Stephen

    Moving the meta data was easy enough I just hadn’t clocked how you were calling up the booking form. just to clarify if I turn off the ‘auto’ part of the booking form will it ALWAYS show or only when appropriate (ie when there are tickets to sell 😉

    thanks for the quick response.

    Michael Waugaman
    #7893

    The plug-in only shows the booking form when there’s tickets to sell. But if you turn off the auto part as above then it’ll never show unless you call into in your theme via eo_get_booking_form() or via the shortcode.

    (Even if using that function / shortcode, the form won’t appear unless their are tickets being sold).

    Stephen Harris
    #7894

    Sorry – shouldn’t have bothered you with the second question as have already figured it out myself 😉

    Again thanks for the quick response!

    Michael Waugaman
    #7898

    No problem 🙂

    Stephen Harris
Viewing 6 posts - 1 through 6 (of 6 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.