Home / Forums / DynamiX Support / Disable Mobile Menu

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts

  • Abdullah Jangda
    Participant

    I am using a separate plugin to generate my mobile menu. How can I disable the mobile menu?

    Andy
    Andy
    Keymaster

    Hi,

    The only way to achieve that is to edit DynamiX/config.header.php and remove the following section of code:

    	if( of_get_option('mobile_menu') != 'select' && !class_exists('UberMenu') )
    	{				
    		echo "\n". '<div id="mobile-tabs" class="skinset-main nv-skin '. $onepage_mobile .'">';
    	
    		echo '<div class="mobilemenu-init clearfix skinset-main nv-skin"><a href="#"><i class="fa fa-times fa-lg"></i></a></div>';
    	
    			if( $menu_slug != 'disable' ) :
    			
    				if ( !class_exists('UberMenu') && ( of_get_option('enable_responsive') !='disable' ) ) : // check if responsive is disabled
    	
    					if ( has_nav_menu( 'mobilenav' ) )
    					{
    						$walker = new dyn_walker;
    
    						wp_nav_menu( array(
    							'echo' => true,
    							'container' => 'ul',
    							'menu_class' => 'menu hide-on-desktops', 
    							'menu_id' => 'mobilemenu',
    							'theme_location' => 'mobilenav',
    							'walker' => $walker,
    							'menu' => $menu_slug
    						));						
    					}
    					elseif ( has_nav_menu( 'mainnav' ) )
    					{
    						$walker = new dyn_walker;
    
    						wp_nav_menu( array(
    							'echo' => true,
    							'container' => 'ul',
    							'menu_class' => 'menu hide-on-desktops', 
    							'menu_id' => 'mobilemenu',
    							'theme_location' =>  'mainnav',
    							'walker' => $walker,
    							'menu' => $menu_slug
    						));						
    					}
    					
    				endif;
    			endif;
    			
    		echo "\n". '</div>';
    	}

    vphan
    Participant

    Hi,

    I tried to remove this code but the menu button is still there but without the menu…

    Could you please help ?

    With many thanks!

    Andy
    Andy
    Keymaster

    Hi,

    What is it you’re trying to achieve, do you have a link to your site please, thanks.


    Abdullah Jangda
    Participant

    I am still trying to do this and haven’t been able to, I would like to disable the theme’s mobile/hamburger menu so I can use a third party one via plugin, currently both are displaying. I have attached a screenshot to explain.

    https://www.dropbox.com/s/z6v2svdukkhw1db/Slack%20for%20iOS%20Upload.jpg?dl=0

    Hi @abdullahjangda

    You can hide the mobile menu using this CSS. Paste it into Theme Options > Customize > Custom CSS box.

    .mobilemenu-init {
        display: none;
    }

    Thanks!


    Abdullah Jangda
    Participant

    That didn’t work, can you please provide a different solution.


    Abdullah Jangda
    Participant

    Also, is there a way to hide the logo on mobile only, I am using a plugin for my mobile menu/top logo and would like to hide the native logo and menu on mobile

    Hi @abdullahjangda

    Can you please send over your site’s login credentials so we can personally test the CSS tweaks?

    Thanks!


    Abdullah Jangda
    Participant
    This reply has been marked as private.

    Hi @abdullahjangda

    The menu and logo should not appear on mobile now.

    Please check and confirm from your end.

    Thanks!


    Abdullah Jangda
    Participant

    Its working! Thank you for resolving the issue! Quick question, in case this ever needs to be undone, how would we do that?

    Hi @abdullahjangda

    You can do that via Appearance > Theme Options > Customize > Mobile CSS

    Regards,

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.