From: Laury GvR Date: Tue, 30 Jan 2018 16:29:25 +0000 (-0500) Subject: Fixed which header img is displayed for posts/members/news X-Git-Tag: v1.0.0^2~63 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b7868eb424194d6cc7e1fd351e3a57f3e742a4aa;p=WP-Themes%2Fwmta.git Fixed which header img is displayed for posts/members/news Entered some checks to make sure member pages only try to display images if they have an image, and that posts display the featured image of the /news page (as per the old site), and that inside pages only show an image if they have one, and otherwise show the default featured image. --- diff --git a/inc/hero-header-news.php b/inc/hero-header-news.php index 51f73f8..d4ff28c 100644 --- a/inc/hero-header-news.php +++ b/inc/hero-header-news.php @@ -1,31 +1,24 @@
- - - - -
- ' ; - } else { - echo '' ; - } - ?> - -
- +
+ ' ; + } else { + echo ''; + } + } else { + echo ''; + } + } else if ( "post" == get_post_type() && has_post_thumbnail(34) ) { + $image = wp_get_attachment_image_src( get_post_thumbnail_id(34), 'single-post-thumbnail' ); + echo '' ; + } else { + echo '' ; + } ?> +
diff --git a/inc/hero-header.php b/inc/hero-header.php index 0c105e7..f465c46 100644 --- a/inc/hero-header.php +++ b/inc/hero-header.php @@ -1,39 +1,24 @@
- - -
- ' ; - } else { - echo ''; - } +
+ ' ; } else { echo ''; } - } else if (has_post_thumbnail( $post->ID ) ) { - $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); - echo '' ; } else { - echo '' ; - } ?> - -
+ echo ''; + } + } else if (has_post_thumbnail( $post->ID ) ) { + $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); + echo '' ; + } else { + echo '' ; + } ?> +