Support » Themes and Templates » Quark » [Resolved] Hide the Menu. Both on Desktop and Mobile
3 years, 3 months ago
I was wondering if anyone code give me the code to hide the menu on both the Desktop version and mobile versions on the site, since the theme is responsive?
If you don’t want to display any menu whatsoever, then simply remove the following lines from header.php
<nav id="site-navigation" class="main-navigation" role="navigation">
<h3 class="menu-toggle assistive-text"><?php esc_html_e( 'Menu', 'quark' ); ?></h3>
<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'quark' ); ?>"><?php esc_html_e( 'Skip to content', 'quark' ); ?></a></div>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
</nav> <!-- /.site-navigation.main-navigation -->
If you’d like to hide the menu, but need to access it later for some reason, you could always attach a display: none; rule to the site-navigation ID, or main-navigation class in the style.css file.
The rule should look something like
You can just add the display: none; rule in with the others and it should cause the menu to disappear entirely, but you can always take the rule out if you need the menu back.
Hope that helps,