Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress From Bootstrap to WordPress Setup a Bootstrap Theme Creating Bootstrap Navigation in WordPress

Brad Griffin
Brad Griffin
7,003 Points

From the code on the right, can anyone see why I'm getting the error on the left?

http://prntscr.com/6zsrat

From the code on the right, can anyone see why I'm getting the error on the left? I've gone through the video countless times ...and.... perhaps I'm just too sleepy to see the syntax error. Does anyone have any ideas?

Thanks folks!

Justin Black
Justin Black
24,266 Points

All I can tell you is that it's on or near line 41. But since from what I can tell, there aren't 41 lines in the header ( maybe there are, i don't know because it's an image and I can't scroll through the source ).

Though &args seems pretty obnoxious to me. That should probably be $args

2 Answers

Brad Griffin
Brad Griffin
7,003 Points

BAHA!!! Look at line 41. It's an ampersand and not a dollar sign! What a dork!! ;-)

Brad Griffin
Brad Griffin
7,003 Points

Thanks Justin! I think I'm understanding that that the error is in reference to a parenthesis, but what I'm not seeing is where the error is. Does this help to see the code better?

<?php get_header(); ?>

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags must come first in the head; any other head content must come after these tags --> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="../../favicon.ico">

<title>Jumbotron Template for Bootstrap</title>

    <?php wp_head(); ?>

</head>

<body <?php body_class(); ?>>

<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="<?php bloginfo( 'url'); ?>"><?php bloginfo( 'name'); ?></a>
    </div>

    <div id="navbar" class="navbar-collapse collapse">

              <?php
                    $args = array(
                            'menu'          => 'header_menu',
                            'menu_class' => 'nav navbar-nav',
                            'container' => 'false'
                    );
                    wp_nav_menu( &args );
              ?>

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

      </div>
</nav>