<!doctype html>
<html class="no-js" lang="en">
<?php get_template_part("parts/header-meta"); ?>
- <?php $index_template = true;
- if ( get_abs_parent() ) {
- $entity_page = get_post(get_abs_parent());
- } else {
- $entity_page = get_post($post->ID);
- }
- $entity_page_slug = $entity_page->post_name; ?>
+ <?php
+ $index_template = true;
+ if ( get_abs_parent() ) {
+ $entity_page = get_post(get_abs_parent());
+ } else {
+ $entity_page = get_post($post->ID);
+ }
+
+ $GLOBALS['entity_page_slug'] = $entity_page->post_name;
+ ?>
<body>
<div class="off-canvas-wrapper">
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
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';
}
}
}
<?php
/* Header for posts*/
function glm_get_header() {
- echo '<div';
- if ( has_post_thumbnail() ) {
- $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
- echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position: center center;background-size: 100%;background-repeat:no-repeat;max-height: 350px; "';
+ if ( !get_abs_parent() ) { // is an entity landing page
+ echo "<div id=\"slide\">";
+ include __DIR__.'/../parts/slideshow.php';
+ echo "</div>";
} 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 '<div';
+ if ( has_post_thumbnail() ) {
+ $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+ echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position: center center;background-size: 100%;background-repeat:no-repeat;max-height: 350px; "';
+ } 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 '</div>';
+ echo '<div class="row">';
+ echo '<div class="small-12 columns">';
+ echo '</div>';
+ echo '</div>';
}
- echo '>';
- echo '</div>';
- echo '<div class="row">';
- echo '<div class="small-12 columns">';
- echo '</div>';
- echo '</div>';
}
\ No newline at end of file
<title><?php wp_title(); ?></title>
<!-- <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">-->
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,700" rel="stylesheet">
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" rel="stylesheet">
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
<!-- <link rel="shortcut icon" href="<?php //echo bloginfo('template_url'); ?>/favicon.ico">-->
<?php wp_head(); ?>
+++ /dev/null
-<div id="slideshow">
- <ul>
- <?php
- switch($entity_page_slug){
- case "government":
- if ( is_active_sidebar( 'government-slideshow' ) ) {
- dynamic_sidebar( 'government-slideshow' );
- }
- break;
- case "chamber-of-commerce":
- if ( is_active_sidebar( 'chamber-slideshow' ) ) {
- dynamic_sidebar( 'chamber-slideshow' );
- }
- break;
- case "convention-visitors-bureau":
- if ( is_active_sidebar( 'cvb-slideshow' ) ) {
- dynamic_sidebar( 'cvb-slideshow' );
- }
- break;
- case "edc":
- if ( is_active_sidebar( 'edc-slideshow' ) ) {
- dynamic_sidebar( 'edc-slideshow' );
- }
- break;
- default:
- if ( is_active_sidebar( 'main-slideshow' ) ) {
- dynamic_sidebar( 'main-slideshow' );
- }
- break;
- }
- ?>
- <?php // do_action('slideshow_deploy', '20'); ?>
-
- </ul>
-</div>
--- /dev/null
+<div id="slideshow">
+ <ul>
+ <?php
+ switch($GLOBALS['entity_page_slug']){
+ case "government":
+ if ( is_active_sidebar( 'government-slideshow' ) ) {
+ dynamic_sidebar( 'government-slideshow' );
+ }
+ break;
+ case "chamber-of-commerce":
+ if ( is_active_sidebar( 'chamber-slideshow' ) ) {
+ dynamic_sidebar( 'chamber-slideshow' );
+ }
+ break;
+ case "convention-visitors-bureau":
+ if ( is_active_sidebar( 'cvb-slideshow' ) ) {
+ dynamic_sidebar( 'cvb-slideshow' );
+ }
+ break;
+ case "edc":
+ if ( is_active_sidebar( 'edc-slideshow' ) ) {
+ dynamic_sidebar( 'edc-slideshow' );
+ }
+ break;
+ default:
+ if ( is_active_sidebar( 'main-slideshow' ) ) {
+ dynamic_sidebar( 'main-slideshow' );
+ }
+ break;
+ }
+ ?>
+ <?php // do_action('slideshow_deploy', '20'); ?>
+
+ </ul>
+</div>
<main class="page-inside entity-interior">
<div id="content-wrapper">
- <?php echo glm_get_header();?>
+ <?php glm_get_header();?>
<?php $sidebar = get_field('sidebar'); ?>
<?php $template = get_page_template_slug($post->ID); ?>
<div class="row column">
<main class="page-inside entity-landing">
<div id="content-wrapper">
- <?php echo glm_get_header();?>
+ <?php glm_get_header();?>
<?php //$post_content = get_post($post->ID); ?>
<div class="row column">
<?php if(!is_front_page()) {
<main class="page-front">
<div id="slide">
- <?php get_template_part('parts/slide-show');?>
+ <?php include __DIR__.'/../parts/slideshow.php'; ?>
</div>
<div id="content-wrapper">
<div id="block-row">
<?php
-if( in_array(get_page_template(), page_templates()) || in_array($entity_page_slug,get_landing_pages()) ){ ?>
+if( in_array(get_page_template(), page_templates()) || in_array($GLOBALS['entity_page_slug'],get_landing_pages()) ){ ?>
<div id="interior-menu" class="show-for-large">
<div class="top-bar">
<div class="top-bar-left">
<div class="top-bar-left">
<?php }
- switch($entity_page_slug){
+ switch($GLOBALS['entity_page_slug']){
case "government":
glm_theme_gov_navigation();
break;