/* Header for posts*/
-function glm_get_header() {
- global $post;
- $post_id = $post->ID;
- echo '<div class="featured-container"><div';
- // inherit featured image from parent pages
- if ( $post->post_parent && !has_post_thumbnail($post->ID)){
- $post_id = $post->post_parent;
- }
-
- 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($post_id), "full");
- echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:30%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 420px;min-height: 150px; "';
- } else {
- echo ' style="background-image: url('.get_template_directory_uri().'/assets/things-to-do.jpg);height:0;padding:0;padding-bottom:30%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 420px; min-height: 150px;"';
- echo ' class="no-featured"';
- }
- echo '>';
- echo '</div>';
- echo '</div>';
-}
+//function glm_get_header() {
+// global $post;
+// $post_id = $post->ID;
+// echo '<div class="featured-container"><div';
+// // inherit featured image from parent pages
+// if ( $post->post_parent && !has_post_thumbnail($post->ID)){
+// $post_id = $post->post_parent;
+// }
+//
+// 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($post_id), "full");
+// echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:30%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 420px;min-height: 150px; "';
+// } else {
+// echo ' style="background-image: url('.get_template_directory_uri().'/assets/things-to-do.jpg);height:0;padding:0;padding-bottom:30%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 420px; min-height: 150px;"';
+// echo ' class="no-featured"';
+// }
+// echo '>';
+// echo '</div>';
+// echo '</div>';
+//}
function glm_get_featured() {
if (has_post_thumbnail()) {
$image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
}
return $imageUrl;
}
-// // The code below is useful when you want the image to resize to
-// if (has_post_thumbnail()) {
-// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
-// echo '<img src="'.$image_data[0].'" style="no-repeat;max-height:400px;">';
-// } else {
-// echo '<img src="'.get_template_directory_uri().'/assets/default-header.gif" style="max-height:400px;">';
-// }
-// echo '<div class="row">';
-// echo '<div class="small-12 columns">';
-// echo '</div>';
-// echo '</div>';
add_action('wp_enqueue_scripts', 'glm_site_scripts');