WordPress.org

Support

Support » Themes and Templates » Quark » [Resolved] Hide the Menu. Both on Desktop and Mobile

[Resolved] Hide the Menu. Both on Desktop and Mobile

  • Hey there,

    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?

    Thanks,
    Phillip

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anthony Hortin

    @ahortin

    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 -->
    Matt Gross

    @mattgrossworkgmailcom

    Hi there,

    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

    #site-navigation {
        css rule;
        css rule;
        css rule;
    }

    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,

    Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Hide the Menu. Both on Desktop and Mobile’ is closed to new replies.
Skip to toolbar