November 15, 2019 - Latest Version 2.8.0 - Changelog

Okay
  Public Ticket #2147594
Link "_blank" to single event
Open

Comments

  • romain started the conversation

    Hello

    I've set the "open_event_in=single" shortcode for my home page.
    Now events open in a single page. But how could I change the "_blank" link to "_self" link, because I don't want to open a new tab each time ?
    Thanks

  •  166
    Zhivko replied

    Hi,

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

    add_action('stec_after_html', function() {
        ?>
        <script type="text/javascript">
            (function ($) {
                $.stecExtend(function (m) {
                    m.eventsHandler.eventToggle = function (e) {
                        window.open(e.data('permalink'), '_self');
                        return false;
                    };
                });
            })(window.jQuery);
        </script>
        <?php
    });

    Stachethemes Developer