Skip to content
This repository has been archived by the owner. It is now read-only.

Disable footer fallback menu & syntax fix #53

Merged
merged 3 commits into from
Nov 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
'menu' => 'Footer',
'container' => false,
'items_wrap' => '%3$s',
'depth' => 1
'depth' => 1,
'fallback_cb' => false
);
wp_nav_menu( $defaults );
}
Expand Down
4 changes: 2 additions & 2 deletions inc/nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<?php _e( 'Skip to content', 'cs' ); ?></a>
<div class="collapse navbar-collapse" id="primary-nav">
<?php
$menu_at_primary_location = get_nav_menu_locations();
$menu_at_primary_location = $menu_at_primary_location['primary'];
$locations = get_nav_menu_locations();
$menu_at_primary_location = $locations['primary'];
$items = wp_get_nav_menu_items( $menu_at_primary_location );
if(empty($items)){
echo '<ul class="nav navbar-nav"><li><a href="'.home_url().'">Home</a></li></ul>';
Expand Down