Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #345491

    Hey!
    I would be interested to have the css to assign a special menu only on mobile view.
    https://kriesi.at/support/topic/assign-a-different-menu-to-mobile-menu/#post-342749
    As the sticky fullwidth submenu (see page “nous connaitre”) is not sticky anymore on mobile, and takes a lot of room… I might want to change this specific fullwidth menu into a dropdown one.
    Thanks!
    Cheers!
    Marie

    #345989

    Hi Marie!

    Enfold already has a responsive menu for mobiles which is the button in the top right hand corner. Are you wanting to disable that and keep your regular menu?

    Best regards,
    Elliott

    #346033

    NOT URGENT

    Hi Elliott!
    Thanks for your answer.
    Yes I want to keep the enfold mobile menu.
    But on desktop, the fullwidth submenu of the “nous connaitre” page is not included really in the “main menu”…
    What I was thinking is build another general menu just for mobile use (like the actual desktop main menu + including child #anchor links just for the “nous connaitre” page) and then, through css, ask for this “mobile menu” to show up instead of the “desktop one”. I’m really talking about architecture here. If I’m confusing, sorry…, go to my page -> see in the main menu -> “nous connaitre” does not have sub-elements. The fullwidth submenu has been “called” on the page trough ALB fullwidth sticky menu element. So If you look at the page on mobile -> items of this fullwidth elements don’t show up in the “enfold mobile menu”… the fullwidthmenu show up on the “page” but it really takes a lot of place and it’s not rendering that good… Unless you have a better idea ? I’m opened ! I don’t know for example is it possible to reduce the font size of this fullwidth submenu ?
    This is not an urgent at all so take your time really.
    I’m just trying to reflect upstream but I already have more urgent and unsolved issues at this stage :)
    Thanks!
    Cheers!
    Marie

    #346596

    Hey!

    Unfortunately, this particular request or modification is more than what we can offer as a support team. This task is simply beyond the scope of support and is not a theme related issue. Please hire a freelance developer or find a third party plugin that coincide with the theme. For further modifications, please visit Envato Studio or Werkpress. You can try to register a new menu no functions.php:

    if(!function_exists('avia_nav_menus'))
    {
    	function avia_nav_menus()
    	{
    		global $avia_config, $wp_customize;
    
    		add_theme_support('nav_menus');
    		
    		foreach($avia_config['nav_menus'] as $key => $value)
    		{
    			//wp-admin\customize.php does not support html code in the menu description - thus we need to strip it
    			$name = (!empty($value['plain']) && !empty($wp_customize)) ? $value['plain'] : $value['html'];
    			register_nav_menu($key, THEMENAME.' '.$name);
    		}
    	}
    
    	$avia_config['nav_menus'] = array(	'avia' => array('html' => __('Main Menu', 'avia_framework')),
    										'avia2' => array(
    													'html' => __('Secondary Menu <br/><small>(Will be displayed if you selected a header layout that supports a submenu <a target="_blank" href="'.admin_url('?page=avia#goto_header').'">here</a>)</small>', 'avia_framework'),
    													'plain'=> __('Secondary Menu - will be displayed if you selected a header layout that supports a submenu', 'avia_framework')),
    										'avia3' => array(
    													'html' => __('Footer Menu <br/><small>(no dropdowns)</small>', 'avia_framework'),
    													'plain'=> __('Footer Menu (no dropdowns)', 'avia_framework'))
    									);
    
    	avia_nav_menus(); //call the function immediatly to activate
    }

    Call this menu just like the avia menu on includes > helper-main-menu.php file but change the menu_class.

     echo "<nav class='main_menu' data-selectname='".__('Select a page','avia_framework')."' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">";
    						        $avia_theme_location = 'avia';
    						        $avia_menu_class = $avia_theme_location . '-menu';
    						        $args = array(
    						            'theme_location'	=> $avia_theme_location,
    						            'menu_id' 			=> $avia_menu_class,
    						            'menu_class'		=> 'menu av-main-nav',
    						            'container_class'	=> $avia_menu_class.' av-main-nav-wrap'.$icon_beside,
    						            'fallback_cb' 		=> 'avia_fallback_menu',
    						            'walker' 			=> new avia_responsive_mega_menu()
    						        );
    						
    						        wp_nav_menu($args);

    Use CSS media queries to show or hide menus. For further modifications, please hire a freelance developer.

    Best regards,
    Ismael

    #346663
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Mobile menu’ is closed to new replies.