From 4b56b714ba62193e52f275424455977ae87797f5 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 28 Apr 2017 07:48:48 -0400 Subject: [PATCH] adding text search function to the header search widget adding the correct name and action to the header search form in the text input field --- functions.php | 27 ++++++++++++++++++++++++++- sections/header.php | 6 +++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 2ec93b9..fc3ecbc 100644 --- a/functions.php +++ b/functions.php @@ -20,7 +20,32 @@ if (!function_exists('glm_quicksite_widget_init')) { } } - +//add_filter('glm-member-db-front-search-query', function( $queryParts ) { +// //$queryParts = array(); +// if ( isset( $_REQUEST['manufacturers'] ) && is_array( $_REQUEST['manufacturers'] ) && !empty( $_REQUEST['manufacturers'] ) ) { +// $catSelectedForQuery = implode( ',', $_REQUEST['manufacturers'] ); +// $queryParts[] = " T.id in ( +// 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) +// ) "; +// } +// // Check to see if Pre-Owned is not set. If it is not set then only get +// // listings without the Pre-Owned +// if ( !isset( $_REQUEST['pre_owned'] ) ) { +// $queryParts[] = " T.id IN ( +// SELECT ref_dest +// FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data +// WHERE field_data != 'Yes' +// AND field_id = (SELECT id +// FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_fields +// WHERE field_name = 'Pre-Owned') +// ) "; +// } +// return $queryParts; +//}); /** * Return the client info option for the given key * diff --git a/sections/header.php b/sections/header.php index a52ae4a..11c7792 100644 --- a/sections/header.php +++ b/sections/header.php @@ -31,12 +31,12 @@
-
+ ?action='list'"> Search for Trail - +
-
+ ?action='list'"> Search by Location