Skip to content

Commit

Permalink
Add nav menu check to fix error when no nav menu assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
mindctrl committed Sep 12, 2012
1 parent dc9ced5 commit f92ba7e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 21 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed css/.DS_Store
Binary file not shown.
Binary file removed custom/.DS_Store
Binary file not shown.
45 changes: 24 additions & 21 deletions header.php
Expand Up @@ -9,19 +9,19 @@
<meta charset="<?php bloginfo('charset'); ?>"> <meta charset="<?php bloginfo('charset'); ?>">


<title><?php wp_title('|', true, 'right'); bloginfo('name'); ?></title> <title><?php wp_title('|', true, 'right'); bloginfo('name'); ?></title>

<!-- Mobile viewport optimized: j.mp/bplateviewport --> <!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />

<!-- Favicon and Feed --> <!-- Favicon and Feed -->
<link rel="shortcut icon" type="image/png" href="<?php echo get_template_directory_uri(); ?>/favicon.png"> <link rel="shortcut icon" type="image/png" href="<?php echo get_template_directory_uri(); ?>/favicon.png">
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/"> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/">

<!-- iPhone Web App Home Screen Icon --> <!-- iPhone Web App Home Screen Icon -->
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon-ipad.png" /> <link rel="apple-touch-icon" sizes="72x72" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon-retina.png" /> <link rel="apple-touch-icon" sizes="114x114" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon-retina.png" />
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon.png" /> <link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-icon.png" />

<!-- Enable Startup Image for iOS Home Screen Web App --> <!-- Enable Startup Image for iOS Home Screen Web App -->
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/mobile-load.png" /> <link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/mobile-load.png" />
Expand All @@ -32,16 +32,16 @@
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-load-ipad-portrait.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" /> <link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-load-ipad-portrait.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
<!-- Startup Image iPhone (320x460) --> <!-- Startup Image iPhone (320x460) -->
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-load.png" media="screen and (max-device-width: 320px)" /> <link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri(); ?>/images/devices/reverie-load.png" media="screen and (max-device-width: 320px)" />

<?php wp_head(); ?> <?php wp_head(); ?>


</head> </head>


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

<!-- Start the main container --> <!-- Start the main container -->
<div id="container" class="container" role="document"> <div id="container" class="container" role="document">

<!-- Row for blog navigation --> <!-- Row for blog navigation -->
<div class="row"> <div class="row">
<header class="twelve columns" role="banner"> <header class="twelve columns" role="banner">
Expand All @@ -51,22 +51,25 @@
</div> </div>
<nav role="navigation"> <nav role="navigation">
<?php <?php
wp_nav_menu( array( if ( has_nav_menu( 'primary_navigation' ) ):
'theme_location' => 'primary_navigation', wp_nav_menu( array(
'container' =>false, 'theme_location' => 'primary_navigation',
'menu_class' => '', 'container' =>false,
'echo' => true, 'menu_class' => '',
'before' => '', 'echo' => true,
'after' => '', 'before' => '',
'link_before' => '', 'after' => '',
'link_after' => '', 'link_before' => '',
'depth' => 0, 'link_after' => '',
'items_wrap' => '<ul class="nav-bar">%3$s</ul>', 'depth' => 0,
'walker' => new reverie_walker()) 'items_wrap' => '<ul class="nav-bar">%3$s</ul>',
); ?> 'walker' => new reverie_walker())
);
endif;
?>
</nav> </nav>
</header> </header>
</div> </div>

<!-- Row for main content area --> <!-- Row for main content area -->
<div id="main" class="row"> <div id="main" class="row">
Binary file removed images/.DS_Store
Binary file not shown.
Binary file removed images/devices/.DS_Store
Binary file not shown.
Binary file removed images/foundation/.DS_Store
Binary file not shown.
Binary file removed js/.DS_Store
Binary file not shown.

0 comments on commit f92ba7e

Please sign in to comment.