0

I would love for somebody to please help me because somewhere I am really miss understanding what WordPress is telling me.

Alright so within my header.php I have the following code.

<div class="navigation navigation-top" id="menu-nav">
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
<li><a href="">Home</a>
<ul>
<li><a href=""></a></li>
</ul>
</li>       

<li class="menu-search"><form method="get" class="form-search" action="">
<input type="text" name="s" class="input-medium" placeholder="">
<input type="hidden" name="site_section" value="all" />
</form></li>
</div>

Now I am not sure what I am doing wrong from the above point onward as I pretty much followed what the guide says on the WordPress wiki. The content below is what is shown in my functions.php file.

//Navigation Bar
register_nav_menus(
array( 'main-menu' => __( 'Main Menu', 'ThemeName' ) )
);

Any help in what I am doing wrong is really really appreciated I have just started coding with WordPress so bare with me.

First is my menu ( Shows as being registered and has content set to be inside of it. ) bottom is my navbar with no content on it at all. enter image description here

1

To see the menu, you need to set it up in the wordpress admin side.

  1. Go to Appearance -> Menus You should see a "Manage Locations" tab.
  2. Select it. You should see your "Main Menu" location.
  3. Choose the menu that you created there.
  4. Select Save Changes.

Since you used "theme-location" to set up drawing it, you need to set a menu to your theme location to actually draw it.

(note) If you have not yet created a menu, you should use the "Edit Menus" tab to create one so that you can associate it as outlined above.

2
  • Check update, I am already doing these things.. and the content is still not displaying on my nav-bar.
    – Ritzy
    Jan 15 '15 at 0:03
  • Strange. It looks good here. Personally, I'd try changing it to main_menu instead of main-menu to see if that does anything. If not, I'd then try invoking it via wp_nav_menu( array('menu' => 'dfasd') ); just to see if it shows up that way. I'd also check the html source to make sure it is not being blocked out by a bad tag... mostly because what I see above looks right.
    – Privateer
    Jan 15 '15 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.