Skip to content

Instantly share code, notes, and snippets.

@WPDevHQ
Last active December 7, 2017 12:28
Show Gist options
  • Save WPDevHQ/642bc364ae9776a07c285ba96d6ba4e9 to your computer and use it in GitHub Desktop.
Save WPDevHQ/642bc364ae9776a07c285ba96d6ba4e9 to your computer and use it in GitHub Desktop.
Keep accordion closed on page load
<?php // Leave this out if you already have an opening php tag in your file!
function elementor_accordion_title() { ?>
<script>
jQuery(document).ready(function() {
jQuery('.elementor-accordion-title').removeClass('active');
jQuery('.elementor-accordion-content').css('display', 'none');
});
</script>
<?php }
add_action( 'wp_footer', 'elementor_accordion_title' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment