Custom WP_Query using shortcode won’t filter results

Forums › Forums › Search & Filter Pro › Custom WP_Query using shortcode won’t filter results

  • This topic has 18 replies, 2 voices, and was last updated 6 years ago by Anonymous.
Viewing 9 posts – 11 through 19 (of 19 total)
  • Anonymous
    #264810
    This reply has been marked as private.
    Trevor
    #264812

    But what file is that function actually defined in?

    And what file actually runs the query?

    Anonymous
    #264814
    This reply has been marked as private.
    Anonymous
    #264816
    This reply has been marked as private.
    Anonymous
    #264850
    This reply has been marked as private.
    Trevor
    #264909
    This reply has been marked as private.
    Anonymous
    #264929

    Works for me too! so it was adding 'search_filter_id' => 3768,?

    `$args = array(
    ‘post_type’ => ‘post’,
    ‘tax_query’ => array(array(
    ‘taxonomy’ => ‘post_format’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘post-format-video’),
    ‘operator’ => ‘IN’
    )),
    ‘search_filter_id’ => 3768,
    );

    funny, because I added it according to the S&F documentation but it didn’t work.

    $args = array(‘post_type’ => ‘post’);
    $args[‘search_filter_id’] = 123;
    $query = new WP_Query($args);
    https://searchandfilter.com/documentation/search-results/custom/

    thank you!

    Trevor
    #264931

    It sometimes is as simple as that, yes. Is it Ok to close this thread for now?

    Anonymous
    #264933

    Yes, great support Sir!

Viewing 9 posts – 11 through 19 (of 19 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.