Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
Alexandra Maltby
0 points
Beginner
ye i know that. but that is not the issue.
the pre_get_posts filter/function ??
mark has already added this function “core_searchfilter”
which adds a meta_query to the search for “featured”
if i modify it it doesnt help when i change the relation to an OR and adding the search meta keys i want to search in with “location1”
$GLOBALS[‘custom’][‘relation’] = ‘OR’;
// added 4 of these one for each map-<FIELD>
$GLOBALS[‘custom’][] = array(
‘key’ => ‘map-<FIELD>’,
‘value’ => strip_tags($_GET[‘location1’]),
‘compare’=> ‘LIKE’
);
The search and advanced search only use the AND relation and therefore they work as each metakey has its own field. which you had suggested above.
im just saying that it fails when i use the OR relation. a 500 server error message displays
i dont know maybe Mark had already tried it before and it failed so he stuck with the advanced search (each metakey or other field has its own form field)
ye i know that. but that is not the issue.
the pre_get_posts filter/function ??
mark has already added this function “core_searchfilter”
which adds a meta_query to the search for “featured”
if i modify it it doesnt help when i change the relation to an OR and adding the search meta keys i want to search in with “location1”
$GLOBALS[‘custom’][‘relation’] = ‘OR’;
// added 4 of these one for each map-<FIELD>
$GLOBALS[‘custom’][] = array(
‘key’ => ‘map-<FIELD>’,
‘value’ => strip_tags($_GET[‘location1’]),
‘compare’=> ‘LIKE’
);
The search and advanced search only use the AND relation and therefore they work as each metakey has its own field. which you had suggested above.
im just saying that it fails when i use the OR relation. a 500 server error message displays
i dont know maybe Mark had already tried it before and it failed so he stuck with the advanced search (each metakey or other field has its own form field)
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now