From 94eb913e56163aee9040ded934e1401f992d77fc Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 5 Apr 2018 16:49:17 -0400 Subject: [PATCH] Default header image now used for member detail pages --- functions.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/functions.php b/functions.php index 94c0ea2..48d9999 100644 --- a/functions.php +++ b/functions.php @@ -73,7 +73,7 @@ function glm_site_scripts() /* Header for posts*/ function glm_get_header($memberID = false) { global $post; - $default_image_path = get_template_directory_uri().'/assets/default-header.jpg?v=1.1'; + $default_image_path = get_template_directory_uri().'/assets/default-header.jpg?v=1.0'; $default_member_image_path = $default_image_path; $featured_classes[] = "featured-image"; $default_background_styles = 'height:0;max-height: 450px;padding:0;padding-bottom:32%;' @@ -83,18 +83,18 @@ function glm_get_header($memberID = false) { if ((has_post_thumbnail() && $post->post_type == 'page') || is_page('member-detail')) { if( !$memberID ) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); - $image_caption = get_the_post_thumbnail_caption(); +// $image_caption = get_the_post_thumbnail_caption(); $image_data = $image_data[0]; $featured_classes[] = $image_data ? "wp-featured" : ""; } else { - $image_data = apply_filters('member_images',$memberID,true,'original'); - $featured_classes[] = $image_data ? "member-featured" : ""; - if ( !$image_data ) { - $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); - $image_caption = get_the_post_thumbnail_caption(); - $image_data = $image_data[0]; - $featured_classes[] = $image_data ? "wp-featured" : ""; - } +// $image_data = apply_filters('member_images',$memberID,true,'original'); +// $featured_classes[] = $image_data ? "member-featured" : ""; +// if ( !$image_data ) { +// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); +// $image_caption = get_the_post_thumbnail_caption(); +// $image_data = $image_data[0]; +// $featured_classes[] = $image_data ? "wp-featured" : ""; +// } if ( !$image_data ) { $image_data = $default_member_image_path; $featured_classes[] = $image_data ? "member-default" : ""; @@ -110,13 +110,13 @@ function glm_get_header($memberID = false) { . 'class="' . implode(' ',$featured_classes) . '"'; echo '>'; - if ($image_caption) { - echo '
'; - echo '
'; - echo $image_caption; - echo '
'; - echo '
'; - } +// if ($image_caption) { +// echo '
'; +// echo '
'; +// echo $image_caption; +// echo '
'; +// echo '
'; +// } } else { $featured_classes[] = "interior-default"; echo '