Forums Forums Search & Filter Pro user specific results

Viewing 3 posts - 11 through 13 (of 13 total)
  • Trevor
    #134234

    As for no results, is that code snippet part of a set of code that calls the header?

    Anonymous
    #134719

    Hello Trevor,

    I’ve tried

    function filter_function_name( $query_args, $sfid ) {
        
        $cat_id = array(1);
    	
    	//if search form ID = 225, the do something with this query
    	if($sfid==32)
        {
            $query_args = array(
    		 'category__in' => array($cat_id),
                );
    	}
    	
    	return $query_args;
    }
    add_filter( 'sf_edit_query_args', 'filter_function_name', 20, 2 );
    

    Is that right? It returns no results – seems not to extend the query ?

    Best
    P.

    Trevor
    #134778

    This is in your child theme functions.php?

Viewing 3 posts - 11 through 13 (of 13 total)