Okay
  Public Ticket #1716331
Event length over multiple days...
Closed

Comments

  •  1
    our_agency started the conversation

    Hi,

    I have set up an event which is set over 3 days. http://csvtraining.co.uk/stec_event/iosh-managing-safely/

    The event is showing 3 days to select from the date dropdown when booking, but should only be showing 25.09.2018 as this is when the event starts.

    It is showing the event is available to book as 3 separate dates, even though it's the same event.

    Is this something you could help with?

    Thanks


  •  894
    Zhivko replied

    Hi,

    Open your  theme functions.php file and add following code at the bottom:

    add_action('wp_footer', function() {
        global $post;
        if (!$post || !isset($post->post_type) || $post->post_type !== 'stec_event') {
            return;
        }
        ?>
        <script type="text/javascript">
            (function ($) {
                $(function () {
                    $('select[name="stec_book_date"]').children().filter(':gt(1)').remove();
                    $('select[name="stec_book_date"]').children().last().prop('selected', true);
                });
            })(jQuery);
        </script>
        <?php
    });



    Stachethemes Developer

  •  1
    our_agency replied

    Thanks thats worked a treat :)

    Michael