Hi,
You can add this code to the file functions.php in the child theme folder or use the plugin Code Snippets to implement.
add_action( 'wp_footer', function() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('ul.nav-menu > li.menu-item-has-children > a').on('click', function() {
$(this).closest('.menu-item').find('.nav-toggle-icon').trigger('click');
});
});
</script>
<?php
} );
it will help you open the sub-menu when clicking to the menu item, not only the arrow down.
Regards.
Thread Starter
cjuni
(@cjuni)
Hi,
When I click it, it also opens all the submenus within the submenu that was clicked.
I made a video for you to understand better.
https://youtu.be/9Q06Cem-yO4