My search had been working fine yesterday. Today I made a few changes, then removed those changes but I cannot get this to work again: https://finigan.org/
You will see the $query_args because I am dumping them from the edit query args filter(shown below)
These query_args don’t seem to match what the search is set up to do. I have a CPT called Poetry Node with ACFs poet_name and poem_name and 6 kinds of node_resources(these act like categories). I have the relationship set to OR in the general settings of the Search form, query_args below say AND. Id of search is 119. Results are As an Archive using index.php. It was working but earlier today I made a duplicate of this search retaining only the poet_name in the form – everything else was the same (except the searchId). I have since deleted that Search form but I’m wondering if that messed something up. I have rebuilt the cache. I’m stumped.
function ffp_edit_query_args( $query_args, $sfid ) {
//if search form ID = 225, the do something with this query
echo "<pre>";
var_dump($sfid);
echo "</pre>";
//if($sfid==204) /* poem_name search */
//{
//modify $query_args here before returning it
//$query_args['somearg'] = 'newvalue';
echo "<pre>";
var_dump($query_args);
echo "</pre>";
//}
return $query_args;
}
add_filter( 'sf_edit_query_args', 'ffp_edit_query_args', 20, 2 );