WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help! Lost my navigation bar!! (10 posts)

  1. rosiesyarncellar
    Member
    Posted 2 years ago #

    I am loosing my mind. In an effort to clean up some of my code (I am super beginner) I lost my navigation bar. Can anyone help me find it? What did I change by accident? I tried to copy the functions.php to my child theme but I was getting an error message there there was some contradicting code. Could that have anything to do with it?

    Here's the URL

  2. Troy Chaplin
    Member
    Posted 2 years ago #

    By "navigation bar" do you mean a site navigation, or the WordPress adminbar?

  3. Peter Wooster
    Member
    Posted 2 years ago #

    You have an open html comment just before your search form that is swallowing up your navigation.

    /peter

  4. govpatel
    Member
    Posted 2 years ago #

    Best way get your theme back is to install the theme I assume is twenty eleven theme.

  5. Peter Wooster
    Member
    Posted 2 years ago #

    An easy way to debug this sort of thing is to use the Safari Web Inspector or the Firefox Firebug plugin. Thats how I found that unclosed comment.
    /peter

  6. rosiesyarncellar
    Member
    Posted 2 years ago #

    Peter can you copy and paste the offending code... I am still kind of new to this. Thanks so much!

  7. Peter Wooster
    Member
    Posted 2 years ago #

    The code is

    <!--
    					<form method="get" id="searchform" action="http://www.test.rosiesyarncellar.com/">

    That <!-- is an html comment and this particular one is not closed, so it turns the search form and your nav bar off. Start by removing the <!--. It's probably in your header.php file.

    /peter

  8. rosiesyarncellar
    Member
    Posted 2 years ago #

    Thanks so much! I was doing something to delete the search bar in the header. How would I go about doing that now? I can't seem to hide it without also hiding the navigation.

  9. Peter Wooster
    Member
    Posted 2 years ago #

    You could either use CSS to hide it or an HTML comment. To use a comment:

    <!--	<form method="get" id="searchform" action="http://www.test.rosiesyarncellar.com/">
    		<label for="s" class="assistive-text">Search</label>
    		<input type="text" class="field" name="s" id="s" placeholder="Search" />
    		<input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" />
    	</form>
    -->

    To use CSS change the form to <form id="searchform" and add a rule to your CSS to make it not display #searchform {display:none;}

    /peter

  10. Peter Wooster
    Member
    Posted 2 years ago #

    Did that work? If so you should mark this as resolved.

    /peter

Topic Closed

This topic has been closed to new replies.

About this Topic