Okay
  Public Ticket #2617955
Single page and attachment
Closed

Comments

  •  3
    metal38 started the conversation

    Hello,

    On the detail page of an event, is it possible to directly see the list of attachments? Not everyone knows that you have to click on the "+". (toggles open).
    Cordially.

  •  877
    Zhivko replied

    Hi,

    Try following:

    Open your active theme functions.php file and add following hook:

    add_action('wp_footer', function() {
        if (!wp_script_is('stec-helper-js')) {
            return;
        }
        ?>
        <script type="text/javascript">
            (function ($) {             $(function () {
                    if (typeof $.stecExtend === 'undefined') {
                        $('.stec-layout-single').find('.stec-layout-single-attachments-list, .stec-layout-single-attachments-toggle').addClass('active');
                    } else {
                        $.stecExtend(function (m) {
                            m.$instance.on('onEventToggleOpen', function (e, data) {
                                data.$container
                                        .find('.stec-layout-event-inner-intro-attachments-toggle, .stec-layout-event-inner-intro-attachments-list')
                                        .addClass('active');
                            });
                        });
                    }
                });
            })(window.jQuery);
        </script>
        <?php
    });



    Stachethemes Developer

  •  3
    metal38 replied

    Hi Zhivko. Perfect. Thanks for your quick answer.

    Christophe