Forums › Forums › Search & Filter Pro › sf_edit_query_args does not change the search
Tagged: sf_edit_query_args
- This topic has 7 replies, 2 voices, and was last updated 7 years, 3 months ago by Anonymous.
-
Anonymous(Private) August 14, 2017 at 8:59 am #125881
Hi there I recently followed the example https://support.searchandfilter.com/forums/topic/null-fields-not-returning-results/ as I have an identical issue.
I used this code pretty much verbatim and a print_r shows all the range fields have been removed from $sf_current_query, HOWEVER the search still behaves as though they are still there and is returning 0 results. If I manually edit the search URL it works fine.
How do I make sf_edit_query_args actually change the search?
Thanks,
Caroline
Trevor(Private) August 14, 2017 at 10:18 am #125885The first thing to do is, in the code, before you make a change, use the PHP
print_r
function to output the query array to the screen, and that, after you modify it, do the same again, and compare the arrays. Like this:echo '<pre>',print_r($sf_current_query,true),'</pre>';
I have not actually used the sf_edit_query_args function myself.
-
AuthorPosts