S&F – AE Pro Posts Blocks – custom query filter, query not filtering

Forums › Forums › Search & Filter Pro › S&F – AE Pro Posts Blocks – custom query filter, query not filtering

Viewing 3 posts – 1 through 3 (of 3 total)
  • Anonymous
    #228737

    Hi,

    I cannot get Search & Filter Pro (S&F) to work with Elementor Pro (Elem) and Anywhere Elementor Pro (AE).

    The steps I have took:
    * In Elem I’ve create a single page template and added an AE Posts Blocks widget to it. The conditions of the template are set to a specific page.
    * In S&F I’ve created a new form, set the post type to posts, set the display results method to custom, entered the correct results URL, checked Ajax, changed the Ajax container to “.ae-post-layout-list” (using a list instead of grid) and added the category widget to the search form UI.
    * The S&F shortcode I’ve added above the AE Posts Block widget, the addition to the shortcode ‘action=”filter_next_query”‘ was not working, so I created a custom query filter. I followed the steps explained by Elem and linked S&F to the query ( $query->set(“search_filter_id”, 123); ).

    Looking at the page I see all categories associated with my posts in a radio button format. I see all posts in the list view. Now when I make different selections I see “.ae-post-layout-list” becoming slightly white transparent for a moment, but nothing is filtering.

    So I asume S&F and the query are linked to each other, but something is going wrong.

    Hope you can help me.

    Thanks

    Pim

    Anonymous
    #228758

    I resolved it myself.

    The explanation by Elem of the Custom Query Filter using the Query ID is a bit different from the explanation of the AE Posts Blocks Query Filter. Using theirs I managed to get it to work.

    function my_super_filter_function($query_args){
      $query_args['search_filter_id'] = 123;
      return $query_args;
    }
    add_filter('my_super_filter', 'my_super_filter_function');
    Trevor
    #228782

    Thanks for sharing, that is very useful. I will close this thread for now.

Viewing 3 posts – 1 through 3 (of 3 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.