WordPress.org

Ready to get started?Download WordPress

Forums

how to remove black nav bar in twenty eleven theme (17 posts)

  1. robby1995
    Member
    Posted 1 year ago #

    ive looked up how to do this but nothing seems to work, i want to know how to completely remove the navigation bar using child theme of twenty eleven.

  2. Julian
    Member
    Posted 1 year ago #

    An easy way via CSS may be.

    #access {
    display: none
    }

    Again not too familiar with twenty eleven.

  3. Julian
    Member
    Posted 1 year ago #

    Another way could be to copy header.php from the parent theme and paste it into the child theme folder. Then remove the <nav id="access" role="navigation"> section. If anyone has a better way please post it. Thanks!

  4. ak.singla
    Member
    Posted 1 year ago #

    These both are the only ways.

    -->In the first -- it was actually there, but not displayed by the browser.

    -->In the later -- it was actually removed from the code files.

    And, certainly should work.

  5. Julian
    Member
    Posted 1 year ago #

    These both are the only ways.

    -->In the first -- it was actually there, but not displayed by the browser.

    -->In the later -- it was actually removed from the code files.

    And, certainly should work.

    Personally I typically use the second method whenever I can.

  6. robby1995
    Member
    Posted 1 year ago #

    i did the second option and removed the code from header.php it worked to a certain extent but now a home link and sample page link are hanging around how can i get rid of these as well ? heres a picture --> picture

  7. Julian
    Member
    Posted 1 year ago #

    What code did you remove from header.php?

  8. robby1995
    Member
    Posted 1 year ago #

    i removed <nav id="access" role="navigation">

  9. Julian
    Member
    Posted 1 year ago #

    Try removing everything in that entire section including <!-- #access -->

  10. ak.singla
    Member
    Posted 1 year ago #

    You should remove the code ::

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->

    That is from line number 42-26 in header.php, starting from <nav> to </nav>.

    </nav> is where the navigation code ends.

  11. Julian
    Member
    Posted 1 year ago #

    I think that twenty eleven is being used though so I'd try removing all of this. Same general idea though. Remove everything through </nav> and <!-- #access -->

    <nav id="access" role="navigation">
                                    <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
                                    <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
                                    <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
                                    <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></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( 'theme_location' => 'primary' ) ); ?>
                            </nav><!-- #access -->
  12. ak.singla
    Member
    Posted 1 year ago #

    Ahh -- I explained it for twentytwelve.

    Use above post to get going.

  13. robby1995
    Member
    Posted 1 year ago #

    yea it worked thanks you guys are awesome :)

  14. Julian
    Member
    Posted 1 year ago #

    Thanks! Glad it worked!

  15. LinaTee
    Member
    Posted 1 year ago #

    I need to find out what the code is for a child theme for twenty eleven. I now know how to create a child theme and I can go to the FTP and delete the black bar but the search box and links stay. I want to create a child theme where the black bar, search box and navigation links are gone. I have tried the access dlsplay:none and branding display: none and that takes the whole header, photo, title and what I want to disappear. I just want the black bar, and the contents in it. PLEASE HELP, I've been searching for three hours.

  16. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @LinaTee - per the forum guidelines, please start your own thread if you need help. Including a link to your site will be helpful too.

  17. LinaTee
    Member
    Posted 1 year ago #

    Thank you I will

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.