Okay
  Public Ticket #1922542
Keeping featured event open
Closed

Comments

  • gizmodesign started the conversation

    I'm showing the featured event on its own, but would like to have the accordion open (ie, show the image with it immediately and they don't have to click). Is this possible? Thanks!

  •  894
    Zhivko replied

    Hi,

    Sorry for the delay.

    Could you provide me with link to the front-end to take a look at the featured event?


    Stachethemes Developer

  •   gizmodesign replied privately
  •  894
    Zhivko replied

    Add the code above in your theme functions.php file at the bottom:

    add_action('wp_footer', function() {
        ?>
        <script type="text/javascript">
            (function($){
                
                if (typeof $.stecExtend === 'undefined') {
                    return;
                }
                
                var completed = false;
                
                var $first_instance = $('.stec').first();
                
                $.stecExtend(function(m){
                    
                    if (true === completed) {
                        return;
                    }
                    
                    $first_instance.find('.stec-layout-agenda-events-all-list .stec-event-featured').first().trigger(m.helper.clickHandle());
                    
                    completed = true;
                    
                }, 'onLayoutSet');
                
            })(jQuery);
        </script>
        <?php
    });



    Stachethemes Developer

  • gizmodesign replied

    Thanks! It didn't seem to change it...

  •  894
    Zhivko replied

    Hi,

    Is it possible to provide me with ftp to check the code?


    Stachethemes Developer