Query another WordPress table

Forums › Forums › Search & Filter Pro › Query another WordPress table

Viewing 10 posts – 21 through 30 (of 39 total)
  • Anonymous
    #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 );

    Trevor
    #50958

    That’s the idea, yes.

    Anonymous
    #50959

    Trevor,
    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
    #50964

    Here 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

    Trevor
    #50966

    Most odd. What happens if you push the priority really late, like 100?

    Anonymous
    #50968

    I tried but still the same 😉
    – no parameters in the url,
    – $query_args are not updated.

    François

    Trevor
    #51007

    OK, When I speak with Ross, I will get him to look.

    Anonymous
    #51019

    Ok, thank you Trevor. How can I send you access to our WordPress ?

    Trevor
    #51020
    This reply has been marked as private.
    Anonymous
    #51023
    This reply has been marked as private.
Viewing 10 posts – 21 through 30 (of 39 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.