From: Anthony Talarico Date: Fri, 28 Apr 2017 20:47:56 +0000 (-0400) Subject: testing seach filter changes by category X-Git-Tag: v1.0.0^2~114 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=89c49a3f1a119db3dd513496cefe52fd401d802a;p=WP-Themes%2Fmichigantrailmaps.git testing seach filter changes by category adding sql queries to filter all of the header search widget category options. modifiying the search filter in the functions file that checks for the category parent for testing --- diff --git a/functions.php b/functions.php index e78962e..f98bcac 100644 --- a/functions.php +++ b/functions.php @@ -29,8 +29,8 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ) { SELECT DISTINCT(member_info) FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info M, ".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories C - WHERE M.category in($catSelectedForQuery) - OR (C.parent in($catSelectedForQuery) AND M.category = C.id) + WHERE M.category in ($catSelectedForQuery) + ) "; } if ( isset( $_REQUEST['cities'] ) && is_array( $_REQUEST['cities'] ) && !empty( $_REQUEST['cities'] ) && $_REQUEST['cities'][0] !== '' ) { diff --git a/js/app.js b/js/app.js index b120116..65e9171 100644 --- a/js/app.js +++ b/js/app.js @@ -118,15 +118,16 @@ $(document).ready(function () { data: { action: "trailmaps", activity: activity, + others: {'destination' : $('#destination-search option:selected').val(), 'park' : $('#park-search option:selected').val()} }, success:function(data){ var activity_data = data; - + console.log(data.test); option = {}; $('#destination-search option').not(':eq(0), :selected').remove(); var selected = $('#destination-search option:selected').val(); - console.info(selected); + console.info(data); // counties.append($('