Forums Forums Search & Filter Pro Filter for custom post has stopped working

Viewing 10 posts - 1 through 10 (of 19 total)
  • Trevor
    #240620

    If the other filter is disabled, does it then work? I suspect that some use is being made of the pre_get_posts() function, which overrides our filter arguments (hence the counts would work, but the actual submit would not).

    Anonymous
    #240707

    Hi Trevor – thanks for the response.

    If the WooCommerce product filter is disabled the original filter still doesn’t work. Neither can I find pre_get_posts being used. I’m using WooCommerce Memberships, so perhaps that’s the issue, but it’s strange that it’s only just stopped working.

    I’ve tried using the recommended Custom code (see below), but still none of the custom post types are displayed:

    $args = array(‘post_type’ => ‘resources’);
    $args[‘search_filter_id’] = 21588;
    $query = new WP_Query($args);

    I’ve also created a new form to see if that would work, with no success.

    Thanks

    Trevor
    #240798

    Are you able to send me a live link/URL to your search page so I can take a look?

    Can you tell me (if you remember) why we/you used the custom method instead of the WooCommerce shop method?

    Anonymous
    #240925

    Will get the Staging site set up.

    Re. your question: the first filter was filtering custom posts so I used the ‘Custom’ option. The second filter I created was for a WooCommerce ‘shop’ page, where I used the ‘WooCommerce Shop’ method. After creating this filter, the one for the custom posts stopped working.

    Anonymous
    #240937
    This reply has been marked as private.
    Trevor
    #240951
    This reply has been marked as private.
    Anonymous
    #241026
    This reply has been marked as private.
    Trevor
    #241056

    So, the WC form stops the custom one from working? Which PHP template file was this code in:

    $args = array('post_type' => 'resources');
    $args['search_filter_id'] = 21588;
    $query = new WP_Query($args);
    Anonymous
    #241665
    This reply has been marked as private.
    Trevor
    #241875
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 19 total)