Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Displaying & refreshing a “Total Results” value with AJAX search

Viewing 5 posts - 1 through 5 (of 5 total)
  • Michael Paras
    #252694

    I am trying to show a dynamic “total” results counter in my sidebar that reflects the total posts returned by each filter. I could really use some guidance on how to do this.

    It’s worth mentioning that I am refreshing the results with AJAX so I can’t have a full page refresh occur.

    Michael Paras
    #252695

    I should also mention that I am using Elementor with a custom Archive page. The Post Widget is being used and I am using the Search & Filter Pro Elementor plugin to connect your product to my post feed.

    Trevor Moderator
    #252752

    I am not aware of any way to do this where the code that generates the posts content is a coded widget rather than a more traditional PHP template. I am assuming that the Archive Posts widget does not show the total posts count?

    Michael Paras
    #252938

    Correct, the archive posts widget does not show the total post count.

    I tried adding some PHP code to the page via a shortcode but it doesn’t refresh when the AJAX call is finished.

    Trevor Moderator
    #252944

    You would have to write some Ajax of your own to trigger that, triggered from our sf:ajaxfinish event, like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        // call your Ajax script or function here
      });
    }(jQuery));</script>
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.