Feature image update.
authorIan Weller <ian@gaslightmedia.com>
Thu, 18 May 2017 19:58:25 +0000 (15:58 -0400)
committerIan Weller <ian@gaslightmedia.com>
Thu, 18 May 2017 20:02:16 +0000 (16:02 -0400)
I updated the featured image shortcode in the fuctions file with Steve's
help.

functions.php
sections/blog-archive.php
sections/blog-home.php
sections/blog-single.php

index 78d3e81..6cd8092 100644 (file)
@@ -79,7 +79,7 @@ function glm_site_scripts()
 function glm_get_header() {
     echo '<div';
     global $post;
-    if (has_post_thumbnail() && (wp_get_post_parent_id( $post->ID ) !== 116)) {
+    if (has_post_thumbnail() && (wp_get_post_parent_id( $post->ID ) !== 116) && $post->post_type == 'page') {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
             echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:25%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height:450px;margin:0 auto;height:100%; "';
     } else {
index 7db8fbc..ed4dfbc 100644 (file)
@@ -1,6 +1,6 @@
                     <main class="blog-archive">
                         <div id="header-image" class="page-header">
-                            
+                            <?php echo glm_get_header();?>
                         </div>
                         <div class="row">
                             <?php get_template_part('parts/blog-content-area'); ?>
index c3e3121..79db0ef 100644 (file)
@@ -1,6 +1,6 @@
                     <main class="blog-home">
                         <div id="header-image" class="page-header">
-                            
+                            <?php echo glm_get_header();?>
                         </div>
                 <!--    <article <?php // post_class() ?> id="interior-featured">
                         <?php // GLM_get_header(); ?>
index 31d652e..834a451 100644 (file)
@@ -1,6 +1,6 @@
                     <main class="blog-single">
                         <div id="header-image" class="page-header">
-                            
+                            <?php echo glm_get_header();?>
                         </div>
                         <div class="row">
                             <div id="blog-posts-over" class="small-12 medium-9 columns">