Permalink
Browse files

adding conditional menu

  • Loading branch information...
1 parent 3fb64da commit 90e7503d3cf3051dd5a62a937c5361c8bd31e497 @ullasjos ullasjos committed Feb 28, 2014
@@ -6,6 +6,8 @@
<?php
$cat_name = $category[0]->cat_name;
$cat_slug = $category[0]->slug;
+$allowed_slug_arrays = array("climate-ecosystems","coastalflooding","energysupply","foodsupply","humanhealth","transportation","water","climate");
+
?>
<div class="subnav banner">
<div class="container">
@@ -24,6 +26,8 @@
'category_name'=> $term_name, 'categorize'=>0, 'title_li'=>0,'orderby'=>'rating');
wp_list_bookmarks($args);
}
+ if(in_array($term_slug,$allowed_slug_arrays))
+ wp_nav_menu(array('theme_location' => 'climate_navigation', 'menu_class' => 'nav','items_wrap' => '%3$s'));
?>
</ul></nav></div>
</div>
@@ -2,6 +2,8 @@
$category = get_the_category();
$term_name = $category[0]->cat_name;
$term_slug = $category[0]->slug;
+$allowed_slug_arrays = array("climate-ecosystems","coastalflooding","energysupply","foodsupply","humanhealth","transportation","water","climate");
+
?>
<div class="subnav banner">
<div class="container">
@@ -24,6 +26,9 @@
'orderby'=>'rating');
wp_list_bookmarks($args);
}
+ if(in_array($term_slug,$allowed_slug_arrays))
+ wp_nav_menu(array('theme_location' => 'climate_navigation', 'menu_class' => 'nav','items_wrap' => '%3$s'));
+
?>
</ul>
</nav>

0 comments on commit 90e7503

Please sign in to comment.