From: Laury GvR Date: Wed, 26 Jul 2017 19:37:54 +0000 (-0400) Subject: When get_abs_parent returns nothing, it now gets the current post ID, avoiding a... X-Git-Tag: v1.0.0^2~116 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7abfc88b51622c79caa9495aa626dfb30907d510;p=WP-Themes%2Fbaragacounty.git When get_abs_parent returns nothing, it now gets the current post ID, avoiding a template call and grabbing the template based on page slug of itself --- diff --git a/sections/top-bar.php b/sections/top-bar.php index 67fed5b..8d6817c 100644 --- a/sections/top-bar.php +++ b/sections/top-bar.php @@ -1,6 +1,11 @@ -ID); +} $page_slug = $page->post_name; + if( in_array(get_page_template(), page_templates()) || in_array($page_slug,get_landing_pages()) ){ ?>
@@ -11,40 +16,24 @@ if( in_array(get_page_template(), page_templates()) || in_array($page_slug,get_l
+ switch($page_slug){ + case "government": + glm_theme_gov_navigation(); + break; + case "chamber-of-commerce": + glm_theme_chamber_navigation(); + break; + case "convention-visitors-bureau": + glm_theme_cvb_navigation() ; + break; + case "edc": + glm_theme_economic_navigation(); + break; + default: + glm_theme_top_bar(); + break; + } + ?> +
-
- \ No newline at end of file + \ No newline at end of file