Forums › Forums › Search & Filter Pro › Query another WordPress table
Tagged: availability, date, query, table, wordpress
- This topic has 38 replies, 4 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
Anonymous(Private) July 12, 2016 at 7:31 pm #50954
Hi Trevor,
I used the code bellow in the functions.php file. Shoudn’t I ?
Thank you 🙂function filter_function_name( $query_args, $sfid ) {
//if search form ID = 1272, the do something with this query
if($sfid==1272)
{
//modify $query_args here before returning it
print_r($query_args);
echo “Yeahhhhhhhhhhhh”;
}//return $query_args;
}
add_filter( ‘sf_edit_query_args’, ‘filter_function_name’, 10, 2 );Anonymous(Private) July 12, 2016 at 7:43 pm #50959Trevor,
If I change the priority from 10 to 20, I get data when I print_r($query_args).Array ( [paged] => 1 [search_filter_id] => 1272 [search_filter_override] => [posts_per_page] => 10 [post_status] => Array ( [0] => publish ) [meta_query] => Array ( ) [post_type] => fucking-show [orderby] => Array ( ) )
But is it normal that the url doesn’t contain the paramters anymore ?
Anonymous(Private) July 12, 2016 at 8:05 pm #50964Here is what I can observe when I play with the different fields (ajax configuration) :
– the parameters are not displayed in the url anymore (except if I comment the function),
– the $query_args are not updated (I guess they depend on the url parameters as well?),
– if I directly type an url with some parameters they don’t appear in the $query_args neither.François
-
AuthorPosts