From 7abfc88b51622c79caa9495aa626dfb30907d510 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 26 Jul 2017 15:37:54 -0400 Subject: [PATCH] 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 --- sections/top-bar.php | 65 ++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) 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 -- 2.17.1