adding post parent checking for featured images
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 24 Mar 2017 12:38:21 +0000 (08:38 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 24 Mar 2017 12:38:21 +0000 (08:38 -0400)
functions.php
js/app.js
js/custom/pageSetup.js
scss/_topbar.scss

index 7ca0773..de894e3 100644 (file)
@@ -99,6 +99,10 @@ function glm_site_scripts()
 function glm_get_header() {
     global $post;
     $post_id = $post->ID;
+    
+    if ( $post->post_parent && !has_post_thumbnail($post->ID)){
+        $post_id = $post->post_parent;
+    }
 
     echo '<div class="header-image-background"';
     if ( is_post_type('page') ) {
index 22c97af..3f43cae 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -62,7 +62,7 @@ $(document).ready(function () {
         var adult_total = 0;
         adult_total = parseInt($(this).val()) * 24;
         console.log(adult_total);
-        total = adult_total;
+        total += adult_total;
         ticket_total.text("$" + total);
     });
     
@@ -74,16 +74,19 @@ $(document).ready(function () {
     });
     
     kids_5.on('change', function(){
-        var kid_5_total = parseInt($(this).val()) * 0;
-         total = kid_5_total;
+        var kid_5_total = 0;
+        kid_5_total = parseInt($(this).val()) * 0;
+        total += kid_5_total;
         ticket_total.text("$" + total);
     });
     
     bikes.on('change', function(){
-        var bike_total = parseInt($(this).val()) * 10;
-         total = bike_total;
+        var bike_total = 0;
+        bike_total = parseInt($(this).val()) * 10;
+        total += bike_total;
         ticket_total.text("$" + total);
     });
+    
     // end ticket form calculations and validation
  
     address_1.on("click", function(){
index 9a5ffbc..51cc110 100644 (file)
@@ -51,7 +51,7 @@ $(document).ready(function () {
         var adult_total = 0;
         adult_total = parseInt($(this).val()) * 24;
         console.log(adult_total);
-        total = adult_total;
+        total += adult_total;
         ticket_total.text("$" + total);
     });
     
@@ -63,16 +63,19 @@ $(document).ready(function () {
     });
     
     kids_5.on('change', function(){
-        var kid_5_total = parseInt($(this).val()) * 0;
-         total = kid_5_total;
+        var kid_5_total = 0;
+        kid_5_total = parseInt($(this).val()) * 0;
+        total += kid_5_total;
         ticket_total.text("$" + total);
     });
     
     bikes.on('change', function(){
-        var bike_total = parseInt($(this).val()) * 10;
-         total = bike_total;
+        var bike_total = 0;
+        bike_total = parseInt($(this).val()) * 10;
+        total += bike_total;
         ticket_total.text("$" + total);
     });
+    
     // end ticket form calculations and validation
  
     address_1.on("click", function(){
index c053e54..f8ab0f4 100644 (file)
@@ -248,7 +248,6 @@ body #ticket-form a.all-tickets-link{
     max-height: 40px;
     line-height: 0;
     padding: 12px;
-    
 }
 .main .ticket_counter_wrapper .ticket-label{
     font-size: 13px;