From: Anthony Talarico Date: Fri, 29 Jan 2016 20:40:20 +0000 (-0500) Subject: fixing featured image page inheritance X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=aaab5213a198e8597acc597984fa195e3429eb4c;p=WP-Themes%2Fglmthemes%2Fsaultstemarie-theme.git fixing featured image page inheritance --- diff --git a/css/app.css b/css/app.css index 64beb8a..4dc6595 100644 --- a/css/app.css +++ b/css/app.css @@ -6205,16 +6205,6 @@ img.alignleft { #blog-side-info { text-align: center; } } -@media print { - #addthis_wrapper, #copyright, #respond, #blog-side-info-wrapper, #footer_address, #action-items, #crumb-line, .no-featured, aside, header, nav, footer { - display: none; } - #blog-posts-over, #blog-posts-over p { - page-break-before: always; } - img { - page-break-before: always; } - h1, h2, h3, h4, h5, h6 { - page-break-before: always; } } - h1, h2, h3, h4, h5, h6 { clear: both; } diff --git a/functions.php b/functions.php index 524626a..0cfe167 100644 --- a/functions.php +++ b/functions.php @@ -81,14 +81,12 @@ function glm_site_scripts() /* Header for posts*/ function glm_get_header() { global $post; - + $post_id = $post->ID; echo 'post_parent ){ + if ( $post->post_parent && !has_post_thumbnail($post->ID)){ $post_id = $post->post_parent; } - else - $post_id = $post->ID; 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"); diff --git a/js/app.js b/js/app.js index 0be6ec2..ae7dfd6 100644 --- a/js/app.js +++ b/js/app.js @@ -135,8 +135,11 @@ $(document).ready(function () { $(document).on('change', '#arriveOff', function () { currentDate = $("#arriveOff").val(); currentDate = new Date(currentDate); + + // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month. currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); currentDate.setDate(currentDate.getDate()); + dd = currentDate.getDate() + 1; if (dd <= 9) { dd = '0' + dd; diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index f9db19f..0104f7e 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -126,8 +126,11 @@ $(document).ready(function () { $(document).on('change', '#arriveOff', function () { currentDate = $("#arriveOff").val(); currentDate = new Date(currentDate); + + // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month. currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); currentDate.setDate(currentDate.getDate()); + dd = currentDate.getDate() + 1; if (dd <= 9) { dd = '0' + dd; diff --git a/scss/_wordpress.scss b/scss/_wordpress.scss index 932cf6b..1e5c8bd 100644 --- a/scss/_wordpress.scss +++ b/scss/_wordpress.scss @@ -232,20 +232,4 @@ img.alignleft, img.alignright, img.aligncenter, img.alignnone, div.wp-caption im text-align: center; } } -@media print { - #addthis_wrapper, #copyright, #respond, #blog-side-info-wrapper, #footer_address, #action-items, #crumb-line,.no-featured, aside, header, nav, footer{ - display: none; - } - #blog-posts-over, #blog-posts-over p{ - page-break-before: always; - } - img{ - page-break-before: always; - } - h1, h2, h3, h4, h5, h6{ - page-break-before: always; - } - -} - // End Search and Posts