Okay
  Public Ticket #2886874
Load calendar after editing event
Closed

Comments

  • Robert Vajda started the conversation

    Hi!

    When I create a new event, after submiting it loads the calendar.

    But when I edit an event at frontend, after submitting it stays at the edit page instead of loading the calendar.

    How can I do that?

    Thanks!

  •  894
    Zhivko replied

    Hi,

    Open your theme or child-theme functions.php file and at the bottom add following hook:

    add_action('wp_footer', function() {
        ?>     <script type='text/javascript'>         (function ($) {
                if (null === document.querySelector('.single-stec_event') || null === document.querySelector('.stec-event-submission-form')) {
                    return;
                }             $(document).on('click', '.stec-builder-form-modal.stec-success .stec-style-button', function () {
                    
                    // REPLACE VALUE WITH YOUR CALENDAR URL
                    var linkToMyCalendar = 'https://link-to-my-calendar-page';
                    
                    window.open(linkToMyCalendar, '_self');
                });         })(window.jQuery);     </script>     <?php
    });

    replace 

    https://link-to-my-calendar-page

    with your actual calendar url


    Stachethemes Developer

  • Robert Vajda replied

    Thanks a lot!!!