excluding epicenter categories from the blog category sidebar
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 30 Apr 2019 19:20:57 +0000 (15:20 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 30 Apr 2019 19:20:57 +0000 (15:20 -0400)
footer.php
functions.php

index 7ffa238..0f9360b 100644 (file)
@@ -112,12 +112,13 @@ if ( ! defined( 'ABSPATH' ) ) {
                 input = $('#input_8_1').val();
                 //alert(input);
                 for (var i = 1; i <= input; i++) {
-                    console.log( i)
                     el = document.createElement("option");
                     el.value = i;
                     el.text = String(i);
+                    var option = $(el).clone();
+                    $(".cell2B").append( option );
                     $(".cell2A").append( $(el) );
-                    $(".cell2B").append( $(el) );
+                    // $(".cell2B").append( $(el) );
                     // document.getElementById('cell2B').appendChild(el);
                 }
             });
@@ -182,8 +183,8 @@ if ( ! defined( 'ABSPATH' ) ) {
                             $("#table2 #cell" + j).attr("readonly", true);
                         }
 
-                        $('.gfield_list_56_cell2').find("[name='input_56[]']").attr("id", 'cell2A');
-                        $('.gfield_list_57_cell2').find("[name='input_57[]']").attr("id", 'cell2B');
+                        $('.gfield_list_56_cell2').find("[name='input_56[]']").addClass('cell2A');
+                        $('.gfield_list_57_cell2').find("[name='input_57[]']").addClass('cell2B');
                         $('.gfield_list_56_cell3').find("[name='input_56[]']").attr("id", 'cell3A');
                         $('.gfield_list_57_cell3').find("[name='input_57[]']").attr("id", 'cell3B');
                         $('.gfield_list_56_cell4').find("[name='input_56[]']").attr("id", 'cell4A');
@@ -195,15 +196,9 @@ if ( ! defined( 'ABSPATH' ) ) {
                         $('#table2 #cell0').val((j.getMonth() + 1) + "/" + j.getDate() + "/" + j.getFullYear());
 
                         for (i = 1; i < $("#field_8_57 .gfield_list tbody tr").length; i++) {
-                            
-                            j = golfDate;
                             $('#cell' + i).val((staticGolfDate.getMonth() + 1) + "/" + (staticGolfDate.getDate() + i) + "/" + staticGolfDate.getFullYear());
-                            $('#table2 #cell' + i).val((j.getMonth() + 1) + "/" + j.getDate() + "/" + j.getFullYear());
-
+                            $('#table2 #cell' + i).val((staticGolfDate.getMonth() + 1) + "/" + (staticGolfDate.getDate() + i) + "/" + staticGolfDate.getFullYear());
                         }
-
-
-                    // alert($("#field_8_56 .gfield_list tbody tr.gfield_list_row_odd").length);
                     }
                 });
             });
index 7da60e3..cf91de1 100644 (file)
@@ -556,6 +556,16 @@ function woocommerce_product_archive_description() {
        }
 }
 
+/** 
+ * Remove gallery and product images
+ */
+function remove_gallery_and_product_images() {
+if ( is_product() ) {
+    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
+    }
+}
+add_action('loop_start', 'remove_gallery_and_product_images');
+
 /**
  * Layerslider API.
  */
@@ -754,6 +764,12 @@ function check_home() {
         add_filter('widget_posts_args','modify_widget');
     } 
 }
+function exclude_widget_categories($args){
+    $exclude = "70";
+    $args["exclude"] = $exclude;
+    return $args;
+}
+add_filter("widget_categories_args","exclude_widget_categories");
 function glm_site_scripts(){
 
     wp_enqueue_script('jquery-ui-datepicker');