Skip to content

Instantly share code, notes, and snippets.

@norewp
Last active April 17, 2018 10:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norewp/2373c083ccd309381eebd4d884c04e38 to your computer and use it in GitHub Desktop.
Save norewp/2373c083ccd309381eebd4d884c04e38 to your computer and use it in GitHub Desktop.
Keep Accordions closed on page load
<?php
function elementor_accordion_closed() { ?>
<script>
jQuery(document).ready(function() {
jQuery( '.elementor-accordion .elementor-tab-title' ).removeClass( 'elementor-active' );
jQuery( '.elementor-accordion .elementor-tab-content' ).css( 'display', 'none' );
});
</script>
<?php }
add_action( 'wp_footer', 'elementor_accordion_closed', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment