WordPress.org

Forums

Responsive
Unregister Menu(s) Function for child-theme functions.php file (2 posts)

  1. Brandon Moner
    Member
    Posted 1 year ago #

    Does anyone have any idea what the unregister menu function are to get rid of certain menus?

    NOTE: I do not want a CSS workaround.

  2. Brandon Moner
    Member
    Posted 1 year ago #

    These menus in particular...

    <?php if( has_nav_menu( 'top-menu', 'responsive' ) ) { ?>
    	<?php wp_nav_menu( array(
    						   'container'      => '',
    						   'fallback_cb'    => false,
    						   'menu_class'     => 'top-menu',
    						   'theme_location' => 'top-menu'
    					   )
    	);
    	?>
    <?php } ?>
    
    <?php get_sidebar( 'top' ); ?>
    <?php wp_nav_menu( array(
    					   'container'       => 'div',
    					   'container_class' => 'main-nav',
    					   'fallback_cb'     => 'responsive_fallback_menu',
    					   'theme_location'  => 'header-menu'
    				   )
    );
    ?>
    
    <?php if( has_nav_menu( 'sub-header-menu', 'responsive' ) ) { ?>
    	<?php wp_nav_menu( array(
    						   'container'      => '',
    						   'menu_class'     => 'sub-header-menu',
    						   'theme_location' => 'sub-header-menu'
    					   )
    	);
    	?>
    <?php } ?>
    
    <?php if( has_nav_menu( 'footer-menu', 'responsive' ) ) { ?>
    	<?php wp_nav_menu( array(
    						   'container'      => '',
    						   'fallback_cb'    => false,
    						   'menu_class'     => 'footer-menu',
    						   'theme_location' => 'footer-menu'
    					   )
    	);
    	?>
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic