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 10 posts – 1 through 10 (of 19 total)
  • Anonymous
    #264554

    hey T,
    I set up a a S&F using a custom query in functions.php which I then call in my page template.

    I’ve set the Results URL to the same as the page URL

    I see the posts on the page and when I select a category from the S&F I get a flash but then results don’t change…

    I’ve done this before using custom post type, and in this case I’m using the default post and categories, so why now won’t this work?

    Any advice would be appreciated
    Aron

    Anonymous
    #264555
    This reply has been marked as private.
    Anonymous
    #264556

    my query pulls all posts that are in video format

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

    Trevor
    #264620
    This reply has been marked as private.
    Anonymous
    #264636
    This reply has been marked as private.
    Anonymous
    #264656
    This reply has been marked as private.
    Trevor
    #264751

    Can you try adding this to the query arguments?

    'search_filter_id' => 3768

    Anonymous
    #264755
    This reply has been marked as private.
    Trevor
    #264757
    This reply has been marked as private.
    Trevor
    #264808
    This reply has been marked as private.
Viewing 10 posts – 1 through 10 (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.