Support » Themes and Templates » Help! TwentyTen Hide Navigation Menu

Viewing 6 replies - 1 through 6 (of 6 total)
  • style.css add at the end

    #access {
    display: none;
    }

    HTH

    David

    Haha, that was so fast, thanks a bunch! It worked perfectly, although a minor issue. If you look at the image here, you can see there are 2 black bars, the top one a bit thicker than the bottom one. Is there any way make them dissapear?

    I’ve tried studying and messing around with style.css and header.php a bit to no avail.

    Michael

    (@alchymyth)

    Forum Moderator

    style.css, appr. line 357:

    /* This is the custom header image */
    #branding img {
    	border-top: 4px solid #000;
    	border-bottom: 1px solid #000;
    	clear: both;
    	display: block;
    }

    remove the two lines with ‘border: ..’

    to your question before:
    if you want to get rid of the code of the menu, edit header.php and remove exactly the following section:

    <div id="access" role="navigation">
    			  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    				<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
    				<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
    				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    			</div><!-- #access -->

    (nb:
    the solution before still produces the html code of the menu and loads it to your browser, just does not show it = equals unnecessary loading time)

    Jeez! You people make it seem so easy 🙁 .. Everything is as exactly as I want it, simple, yet scalable cause it’s running wordpress! 😉

    If you do not want to change the default code then again in the style.css add at the end.

    #branding img {
    	border: 0;
    }

    If ever you decide you want the ‘menu back’ it is easy just remove what you have added to the style.css, if you remove code you have to remember what you deleted.

    As you are new to WordPress we should also point out that if the ‘twenty ten’ theme gets updated by WordPress and you press ‘yes’, like a few others did recently you could loose the changes you have made to your theme.

    alchymyth has pointed out that removing the code saves loading time, however there is a strong opinion from WordPress that we should develop using child themes.

    If you want to remove code then do have a read up on child themes, they are not hard once you understand the concept, and changes to the parent (twenty ten) will not affect the child theme if you update the parent.

    HTH

    Not everyone gets a quick reply, I just happened to be looking while at lunch.

    David Child Themes Learn More

    <blockquote><em><strong></strong></em><a href="http://">

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Help! TwentyTen Hide Navigation Menu’ is closed to new replies.