title: Fatal error: Class 'Walker_Nav_Primary' not found
body: <p>I am trying to change the markup for the nav on my site and I am pretty new to developing wordpress, but I am having issues getting it to display my Walker class. I am attempting to reconfigure the 2017 theme that comes with Wordpress. But I keep getting this error that says "Fatal error: Class 'Walker_Nav_Primary' not found in /wp-content/themes/Vibe/header.php on line 56" This is what the class looks like:</p>
  
  <pre><code>&lt;?php
    class Walker_Nav_Primary extends Walker_Nav_menu {
  
      function start_lvl( &amp;$output, $depth = 0, $args = array() ){ //ul
          $indent = str_repeat("\t",$depth);
          $submenu = ($depth &gt; 0) ? ' sub-menu' : '';
          $output .= "\n$indent&lt;ul class=\"dropdown-menu$submenu depth_$depth\"&gt;\n";
      }
      /*  
      function start_el( ){ //li a span
      }
      function end_el(){ // closing li a span
      }
  
      function end_lvl(){ // closing ul
  
      }
      */
       }
  </code></pre>
  
  <p>And the portion of my header file where I am calling it: </p>
  
  <pre><code>&lt;?php wp_nav_menu( array(
      'theme_location' =&gt; 'top',
      'menu_id'        =&gt; 'primary-menu',
      'menu_class'        =&gt; 'head-menu',
      'walker'            =&gt;  new Walker_Nav_Primary(),
  ) ); ?&gt;
  </code></pre>
  
  <p>EDIT:</p>
  
  <pre><code>// This theme uses wp_nav_menu() in two locations.
  register_nav_menus( array(
      'top'    =&gt; __( 'Top Menu', 'twentyseventeen' ),
      'social' =&gt; __( 'Social Links Menu', 'twentyseventeen' ),
  ) );
  </code></pre>