Skip to content

Instantly share code, notes, and snippets.

@abid112
Created August 3, 2021 13:08
Show Gist options
  • Save abid112/68fa5d3d1edc74ffb9c39b9ea15a14a1 to your computer and use it in GitHub Desktop.
Save abid112/68fa5d3d1edc74ffb9c39b9ea15a14a1 to your computer and use it in GitHub Desktop.
Click instead of hover to open Elementor Pro (Nav Menu widget) submenu
//Here is the full video: https://youtu.be/F2dFOSIivRA
//Dequeue Elementor Pro smartmenus script
function elementor_pro_dequeue_script(){
wp_dequeue_script('smartmenus');
}
add_action('wp_footer', 'elementor_pro_dequeue_script', 15);
//Enqueue Modified smartmenus script
function custom_smartmenu_js(){
wp_enqueue_script('ovverride-menu', get_stylesheet_directory_uri() . '/js/jquery.smartmenus.min.js', array('jquery'), '', true);
}
add_action('wp_enqueue_scripts', 'custom_smartmenu_js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment