Fixed featured function grabbing ID, moved container div into function
authorLaury GvR <laury@gaslightmedia.com>
Wed, 10 Feb 2016 15:46:34 +0000 (10:46 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 10 Feb 2016 15:46:34 +0000 (10:46 -0500)
archive.php
functions.php
home.php
index.php
search.php
single.php

index 34149b0..8ac969b 100644 (file)
@@ -1,5 +1,5 @@
 <?php get_header(); ?>
-<?php glm_get_header(); ?>
+<?php glm_get_featured(); ?>
 <div id="crumb-line">
     <div class="row">
         <?php
index d101bb2..c4696b0 100644 (file)
@@ -108,10 +108,10 @@ function glm_get_featured() {
     }
 
     if (has_post_thumbnail($post_id) && (!(is_home()) ) && (!(is_single())) && (!(is_archive())) && (!(is_search()))) {
-        $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-        $imageUrl = '<div class="featured-image" style="background: url(\''.$image_data[0].'\') no-repeat scroll 0px 0px / cover;;"></div>';
+        $image_data = wp_get_attachment_image_src($post_id, "full");
+        $imageUrl = '<div class="featured-container"><div class="featured-image" style="background: url(\''.$image_data[0].'\') no-repeat scroll 0px 0px / cover;;"></div></div>';
     } else {
-        $imageUrl = '<div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/things-to-do.jpg\') no-repeat scroll 0px 0px / cover;;"></div>';
+        $imageUrl = '<div class="featured-container"><div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/things-to-do.jpg\') no-repeat scroll 0px 0px / cover;;"></div></div>';
     }
     return $imageUrl; 
 }
index c7cde60..61e4802 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,7 +1,5 @@
 <?php get_header(); ?>
-<div class="featured-container">
-    <?php echo glm_get_featured(); ?>
-</div>
+<?php echo glm_get_featured(); ?>
 <div id="crumb-line">
     <div class="row">
         <?php
index f1368b2..5d36717 100644 (file)
--- a/index.php
+++ b/index.php
@@ -5,9 +5,7 @@
             get_template_part('parts/glm-kitchen-sink');
         } else { ?>
         <div id="content-wrapper">
-            <div class="featured-container">
-                <?php echo glm_get_featured(); ?>
-            </div>
+            <?php echo glm_get_featured(); ?>
             <div id="crumb-line">
                 <div class="row">
                     <?php
index 6c69d82..074c874 100644 (file)
@@ -1,7 +1,5 @@
 <?php get_header(); ?>
-<div class="featured-container">
-    <?php echo glm_get_featured(); ?>
-</div>
+<?php echo glm_get_featured(); ?>
 <main class="search-results">
     <div class="row">
         <?php if (get_search_query() == "") { ?>
index 17e2231..5dda1b3 100644 (file)
@@ -1,7 +1,5 @@
 <?php get_header(); ?>
-<div class="featured-container">
-    <?php echo glm_get_featured(); ?>
-</div>
+<?php echo glm_get_featured(); ?>
 <?php if (!is_post_type("ai1ec_event")) { ?>
 <div id="crumb-line">
     <div class="row">