Tagged: mobile menu
I custom made the header to add some extra links and things to the header. Those things are not in the menu. However, I want to hide all these custom things in mobile and put them all in the mobile menu. How can I customize the mobile menu to add some extra things into it? which script or function can I add some custom code to the mobile menu?
I found the mobile menu is a javascript clone from the main menu on “enfold/js/avia.js” function avia_responsive_menu().
I need to add some hidden items on php and do the same clone on javascript and append to the mobile menu. If I want this JS in child theme, should I just create the same js file on child theme?
Hi!
Please add following code to Functions.php file of your child theme
function wp_change_aviajs() {
wp_dequeue_script( 'avia-default' );
wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
}
add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );
and move modified file inside /js folder
Regards,
Yigit
thx