Update for website search.
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 29 May 2018 16:47:27 +0000 (12:47 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 29 May 2018 16:47:27 +0000 (12:47 -0400)
Need to not have textSearch because it is adding to the member search.

functions.php
inc/custom.php
style.css
template-parts/search-overlay.php

index 8c45f64..e484879 100644 (file)
@@ -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;
index ebf488a..a5f7b76 100644 (file)
@@ -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
index 312231b..2416904 100644 (file)
--- 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
index 9c6fae2..0754448 100644 (file)
@@ -124,7 +124,7 @@ $cities = $decode_array['cities'];
 
         myEl.addEventListener('click', function() {
             var search_url = '<?php esc_url( home_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)
                 + '&regionUserSearch[]=' + encodeURI(document.getElementById('xre').value);