From 9b9a7969b4b8e4cd2c1a3063d6e41ae42b701bcd Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 29 May 2018 12:47:27 -0400 Subject: [PATCH] Update for website search. Need to not have textSearch because it is adding to the member search. --- functions.php | 5 ++++- inc/custom.php | 2 +- style.css | 2 +- template-parts/search-overlay.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 8c45f64..e484879 100644 --- a/functions.php +++ b/functions.php @@ -419,7 +419,10 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ){ AND name LIKE '%$textSearch%' ) OR T.descr LIKE '%$textSearch%' - OR T.city IN ( SELECT id FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "cities WHERE name LIKE '%$textSearch%' ) + OR T.city IN ( + SELECT id + FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "cities + WHERE name LIKE '%$textSearch%' ) )"; } return $queryParts; diff --git a/inc/custom.php b/inc/custom.php index ebf488a..a5f7b76 100644 --- a/inc/custom.php +++ b/inc/custom.php @@ -130,7 +130,7 @@ function display_memberfindme_directory() { $_REQUEST['action'] = 'list'; $_REQUEST['event_name'] = $_REQUEST['s']; echo do_shortcode('[glm-members-list view="grid" ]'); - if( isset($_REQUEST['textSearch']) && !empty($_REQUEST['textSearch'])){ + if( isset($_REQUEST['event_name']) && !empty($_REQUEST['event_name'])){ echo do_shortcode('[glm-members-event-list]'); } // $my_postid = 30722;//This is page id or post id diff --git a/style.css b/style.css index 312231b..2416904 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/ Author: Underscores.me Author URI: http://underscores.me/ Description: Description -Version: 1.0.23 +Version: 1.0.24 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: wmta diff --git a/template-parts/search-overlay.php b/template-parts/search-overlay.php index 9c6fae2..0754448 100644 --- a/template-parts/search-overlay.php +++ b/template-parts/search-overlay.php @@ -124,7 +124,7 @@ $cities = $decode_array['cities']; myEl.addEventListener('click', function() { var search_url = '' - + '/?s=' + encodeURI(document.getElementById('tag').value) + '&textSearch='+ encodeURI(document.getElementById('tag').value) +'&glm_action=list' + + '/?s=' + encodeURI(document.getElementById('tag').value) + '&glm_action=list' + '&categorySearch=' + encodeURI(document.getElementById('lbl').value) + '&cityUserSearch[]=' + encodeURI(document.getElementById('xlo').value) + '®ionUserSearch[]=' + encodeURI(document.getElementById('xre').value); -- 2.17.1