From c0355282e0daaadfca2a34615105951b2add0ec8 Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Fri, 23 Aug 2024 21:02:45 +0200 Subject: [PATCH] Do not show featured image on pages if option is set (#707) --- phpcs-report.xml | 4 ++++ sass/_single.scss | 5 ----- template-parts/content-page.php | 11 ++++++++--- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 phpcs-report.xml diff --git a/phpcs-report.xml b/phpcs-report.xml new file mode 100644 index 00000000..d434de7d --- /dev/null +++ b/phpcs-report.xml @@ -0,0 +1,4 @@ + + + + diff --git a/sass/_single.scss b/sass/_single.scss index 6441cec8..44de8c59 100644 --- a/sass/_single.scss +++ b/sass/_single.scss @@ -42,11 +42,6 @@ margin: 0; } - -header.has-no-post-thumbnail { - margin-bottom: 0; -} - body.page .entry-header { padding-bottom: 35px; } diff --git a/template-parts/content-page.php b/template-parts/content-page.php index 8f89f406..36f163df 100755 --- a/template-parts/content-page.php +++ b/template-parts/content-page.php @@ -7,8 +7,9 @@ * @package sunflower */ -$sunflower_styled_layout = (bool) get_post_meta( $post->ID, '_sunflower_styled_layout', true ) ?? false; -$sunflower_class = $args['class'] ?? ''; +$sunflower_show_post_thumbnail = has_post_thumbnail() && ! get_post_meta( $post->ID, '_sunflower_hide_feature_image', true ); +$sunflower_styled_layout = (bool) get_post_meta( $post->ID, '_sunflower_styled_layout', true ) ?? false; +$sunflower_class = $args['class'] ?? ''; ?>
> @@ -20,7 +21,11 @@ } ?> - +