From 22f5d25e6cadf7a8fe72315e4f960fd23b0e02a5 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 27 Jul 2017 14:26:59 -0400 Subject: [PATCH] Entity_page_slug made part of GLOBALS array to allow access in slideshow.php included files. --- index.php | 21 +++++++++-------- lib/header.php | 30 +++++++++++++++---------- parts/header-meta.php | 2 +- parts/{slide-show.php => slideshow.php} | 2 +- sections/entity-interior.php | 2 +- sections/entity-landing.php | 2 +- sections/front-page.php | 2 +- sections/top-bar.php | 4 ++-- 8 files changed, 37 insertions(+), 28 deletions(-) rename parts/{slide-show.php => slideshow.php} (96%) 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/slideshow.php similarity index 96% rename from parts/slide-show.php rename to parts/slideshow.php index 3bbffd7..6b269b3 100644 --- a/parts/slide-show.php +++ b/parts/slideshow.php @@ -1,7 +1,7 @@