change mfn_wp_mobile_menu option via javascript?
Can anyone help a non coder change the mobile menu on certain pages using javascript?
see image: https://i.imgur.com/sEwEtNn.jpeg
mfn_wp_mobile_menu
I have a section of a website where the menu on mobile I would like to change using javascript to use a different mobile menu than what's default using betheme options.
RESPONSIVE | HEADER | MENU > Menu custom mobile main menu
RESPONSIVE | HEADER | MENU > Menu custom mobile main menu
I found some code in theme-menu.php which can help
echo '<nav id="menu">';
// main menu
wp_nav_menu( $args );
// custom mobile menu
mfn_wp_mobile_menu();
echo '</nav>';
/**
* Mobile Menu
*/
if( ! function_exists( 'mfn_wp_mobile_menu' ) )
{
function mfn_wp_mobile_menu()
{
if( $menu_ID = mfn_opts_get( 'mobile-menu' ) ){
$args = array(
'container' => false,
'menu_class' => 'menu menu-mobile',
'link_before' => '<span>',
'link_after' => '</span>',
'depth' => 5,
'menu' => intval( $menu_ID ),
);
wp_nav_menu( $args );
}
}
}
Comments
Sorry, but we did not test this script with the theme. Our policy states that we do not support custom code so unfortunately, we cannot be of any help to you.
thanks