WordPress WordPress Theme Development WordPress Header and Footer Templates Porting existing headers and footers into WordPress

Menu not Displayed

As far as I can tell, did everything video prescribed. However, my wordpress menu at the top is not displaying. CSS seems to have pulled in, but maybe not js? Thanks


<?php get_header(); ?>
<h1>Hello Index! - localhost/index.php</h1>
<?php get_footer(); ?>


<!doctype html>
<html class="no-js" lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title><?php wp_title(); ?></title>
 <?php wp_head(); ?>

    <header class="row no-max pad main">
  <h1><a class='current' href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
  <a href="" class="nav-toggle"><span></span>Menu</a>
    <h1 class="open"><a class='current' href=="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    <ul class="no-bullet">
      <li class="current parent"><a class='current' href="index.html">Portfolio</a>
        <ul class="sub-menu">
          <li><a href="item.html">Portfolio Item</a></li>
          <li><a href="item.html">Portfolio Item</a></li>
          <li><a href="item.html">Portfolio Item</a></li>
          <li><a href="item.html">Portfolio Item</a></li>
      <li class="parent"><a href="blog.html">Blog</a>
        <ul class="sub-menu">
          <li><a href="single-post.html">Single Post</a></li>
          <li><a href="author.html">Author Page</a></li>
      <li><a href="about.html">About</a></li>
      <li><a href="contact.html">Contact</a></li>


div class="footer-clear"></div>
<footer class="row no-max pad">

  <p>Copyright <?php echo date('Y'); ?></p>

<?php wp_footer(); ?>


function wpt_theme_styles() {

    wp_enqueue_style( 'foundation_css', get_template_directory_uri() . '/CSS/foundation.css' );
    //wp_enqueue_style( 'normalize_css', get_template_directory_uri() . '/CSS/normalize.css' );
    wp_enqueue_style( 'normalize_css', 'http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic' );
    wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );

add_action( 'wp_enqueue_scripts', 'wpt_theme_styles' );

function wpt_theme_js() {

    wp_enqueue_script( 'modernizr_js', get_template_directory_uri() . '/js/modernizr.js', '', '', false );  
    wp_enqueue_script( 'foundation_js', get_template_directory_uri() . '/js/foundation.min.js', array('jquery'), '', true );
    wp_enqueue_script( 'main_js', get_template_directory_uri() . '/js/app.js', array('jquery', 'foundation_js'), '', true );        

add_action( 'wp_enqueue_scripts', 'wpt_theme_js' );


1 Answer

I don't don't really have an answer, but menu is showing now. Not sure why. I had previously flushed browser cache, reloaded and still no menu. Then, after I went into WP admin, menu was there. Seems like some type of caching, but thought I had tried that. Anyway, OK now. Thanks