From: Anthony Talarico Date: Fri, 28 Apr 2017 11:48:48 +0000 (-0400) Subject: adding text search function to the header search widget X-Git-Tag: v1.0.0^2~116 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4b56b714ba62193e52f275424455977ae87797f5;p=WP-Themes%2Fmichigantrailmaps.git 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 --- 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