From: Laury GvR Date: Thu, 27 Jul 2017 18:26:59 +0000 (-0400) Subject: Entity_page_slug made part of GLOBALS array to allow access in slideshow.php included... X-Git-Tag: v1.0.0^2~107 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=22f5d25e6cadf7a8fe72315e4f960fd23b0e02a5;p=WP-Themes%2Fbaragacounty.git Entity_page_slug made part of GLOBALS array to allow access in slideshow.php included files. --- diff --git a/index.php b/index.php index 2c23ea8..0400b7c 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,16 @@ - ID); - } - $entity_page_slug = $entity_page->post_name; ?> + ID); + } + + $GLOBALS['entity_page_slug'] = $entity_page->post_name; + ?>
@@ -35,10 +38,10 @@ if(get_abs_parent()){ // If I have an entity landing page as parent, I must be an entity interior page - get_template_part('sections/entity-interior'); + include __DIR__.'/sections/entity-interior.php'; } else { // If not, and I am clearly not frontpage (checked above), I must be an entity landing page - get_template_part('sections/entity-landing'); + include __DIR__.'/sections/entity-landing.php'; } } } diff --git a/lib/header.php b/lib/header.php index c091add..b74d33f 100644 --- a/lib/header.php +++ b/lib/header.php @@ -1,18 +1,24 @@ "; + include __DIR__.'/../parts/slideshow.php'; + echo "
"; } else { - echo ' style="background-image: url('.get_template_directory_uri().'/assets/header-image.jpg);height:0;padding:0;padding-bottom:30%;background-position: center center;background-size: 100%;background-repeat:no-repeat;max-height: 500px;"'; - echo ' class="no-featured"'; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo '
'; + echo '
'; } - echo '>'; - echo ''; - echo '
'; - echo '
'; - echo '
'; - echo '
'; } \ No newline at end of file diff --git a/parts/header-meta.php b/parts/header-meta.php index 1119c39..1401329 100644 --- a/parts/header-meta.php +++ b/parts/header-meta.php @@ -4,7 +4,7 @@ <?php wp_title(); ?> - + diff --git a/parts/slide-show.php b/parts/slide-show.php deleted file mode 100644 index 3bbffd7..0000000 --- a/parts/slide-show.php +++ /dev/null @@ -1,35 +0,0 @@ -
- -
diff --git a/parts/slideshow.php b/parts/slideshow.php new file mode 100644 index 0000000..6b269b3 --- /dev/null +++ b/parts/slideshow.php @@ -0,0 +1,35 @@ +
+ +
diff --git a/sections/entity-interior.php b/sections/entity-interior.php index 1920542..57cec4f 100644 --- a/sections/entity-interior.php +++ b/sections/entity-interior.php @@ -1,6 +1,6 @@
- + ID); ?>
diff --git a/sections/entity-landing.php b/sections/entity-landing.php index 6907057..0c62fc0 100644 --- a/sections/entity-landing.php +++ b/sections/entity-landing.php @@ -1,6 +1,6 @@
- + ID); ?>
- +
diff --git a/sections/top-bar.php b/sections/top-bar.php index ed1d677..828cb46 100644 --- a/sections/top-bar.php +++ b/sections/top-bar.php @@ -1,5 +1,5 @@ +if( in_array(get_page_template(), page_templates()) || in_array($GLOBALS['entity_page_slug'],get_landing_pages()) ){ ?>
@@ -9,7 +9,7 @@ if( in_array(get_page_template(), page_templates()) || in_array($entity_page_slu