简体   繁体   中英

WordPress Nav won't display

I'm attempting to make a WordPress theme from scratch for the first time. Having trouble with the displaying. Here's what my theme looks like .

Here is the code:

<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
  <div class="container">
    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </a>
    <a class="brand" href="<?php echo site_url(); ?>"><?php bloginfo('name'); ?></a>
    <div class="nav-collapse collapse">

          <?php 

            $defaults = array(
                'container' => false,
                'theme_location' => 'primary-menu',
                'menu' => 'div'
                );

            wp_nav_menus( $defaults );

          ?>

    </div><!--/.nav-collapse -->
  </div>
</div>

With a new WordPress guy like myself, something tells me I'm missing something small, or I'm not explaining this properly.

in your theme folder make header.php if it doesn't exist, then you add your code there. Here is list of templates wordpress follows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM