Forums Forums Search & Filter Pro Filter not working

Tagged: 

Viewing 10 posts - 11 through 20 (of 26 total)
  • Trevor
    #218315

    I have made a change to the Ajax Container in the form.

    In the page, see this shortcode element:

    https://www.screencast.com/t/BAL1kvYAHG

    Can you edit that to make it only:

    [searchandfilter id="2415"]

    Then, add a text element directly above the results grid, and in the text tab (not the visual tab) of that Text element, paste this:

    [searchandfilter id="2415" action="filter_next_query"]
    <script>(function ( $ ) {
    	"use strict";
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts'));
    	});
    }(jQuery));</script>

    This still might not work for Ajax refresh, as the script was designed for normal Elementor Grid Blocks, not those from Anywhere Elementor. But some progress will have been made, I hope.

    Anonymous
    #218427

    No dice – I had to deactivate WordFence to mitigate a server 403 error.

    For the sake of testing, I just added an Elementor Grid – and still no deal with and without text element.

    Right now, I have a custom search with both search codes showing.

    [searchandfilter id=”2415″]
    [searchandfilter id=”2415″ action=”filter_next_query”]

    Trevor
    #218501

    I made some changes:

    1. The Ajax Container in the form
    2. The shortcode element in the side has the one shortcode in now, using the form ID not slug.
    3. Added a new Text element above the grid, with a shortcode and script in.

    Anonymous
    #218517

    The good: It seems to be working
    The bad: This shows up on the frontend

    (function ( $ ) { “use strict”; // detects when the ajax request has finished and the content has been updated // re-init the layout scripts from Elementor $(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){ elementorFrontend.hooks.doAction(‘frontend/element_ready/posts.classic’, jQuery(‘.elementor-widget-posts’)); }); }(jQuery));

    Trevor
    #218519

    Somehow the script tags have been removed is my guess. I cannot edit the page right now, as you have it open.

    The Text element has a visual and a plain text tab, and the script must be entered in the plain text and it must be saved with that open. If you save it in the visual mode, elementor will strip the tags.

    Anonymous
    #218523

    Nice …

    Trevor,

    I wish to compliment you – for your patience, expertise and support.

    I am now going to play around with this – perhaps adding in some AE dynamic custom fields.

    Well played – well played indeed!

    Anonymous
    #218539

    Trevor,

    If I wanted to expand this solution to AE Block templates – how would I?

    The Elementor solution works fine – but limited by the way Elementor handles an Archive listing.
    AE allows me to build this in a very different, dynamic way.

    How would I adapt your solution – via -:

    1) Ajax container class to
    2) JS script

    I assume I would need another Search Form specific to AE.

    Again, thank you for your support.

    Trevor
    #218554
    This reply has been marked as private.
    Anonymous
    #218650
    This reply has been marked as private.
    Ross Moderator
    #218773
    This reply has been marked as private.
Viewing 10 posts - 11 through 20 (of 26 total)