Support » Plugin: Popup Maker - Popup Forms, Opt-ins & More » Compatibility with Search&Filter Pro

  • Resolved palomar83



    On my mobile website (width screen must be under 992px) I have a popup that contains a shortcode from the plugin Search&Filter Pro.

    This popup is triggered by clicking on the top right magnifier (see screenshot: Reminder, browser width must be under 992px.

    The 2 dropdown menus in this popup make it possible to filter posts after hitting the button “Rechercher”.

    On a first search, everything is OK, after hitting “Rechercher” the popup closes and we see the search results.

    The problem is that if we try to search a second time from this result page without refreshing it (by triggering the popup one more time with the magnifier icon), after hitting “Rechercher” the popup doesn’t automatically disappear. This second search actually works but one has to close the popup manually to see the results. I would want the popup to close automatically.

    I have asked the question to the developer of Search&Filter Pro and here was his response:

    Does the page use Ajax to load the results? If so, you need to re-initialize any JavaScript on that form, like this:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
    // call your function here

    It is too technical for me. Would you have guidance? Alternatively could you recommend a developer to me on a task/time basis that could help me with this problem?



    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author danieliser


    @palomar83 – So basically you need to close the popup when the form submits?

    Simple enough:

    2. This is what your code would look like.

    (function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
        PUM.close(123);  // Change 123 to match your popups ID # from the All Popups screen.

    Otherwise you can try our facebook group to find someone to hire:

    Hope that helps. If your issue is resolved please take a moment to rate and review the plugin or support.

    If you still need help please message us directly at

    Thanks a lot, adding the following code to my functions.php file did the job. I took the liberty to add document, undefined at the beginning and switch to jQuery, document at the end as I saw these terms in your “getting started with js” page.

    add_action( 'wp_footer', 'my_custom_popup_scripts', 500 );
    function my_custom_popup_scripts() { ?>
        <script type="text/javascript">
    		(function ( $, document, undefined ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        console.log("ajax complete");
        PUM.close(32205);  // Change 123 to match your popups ID # from the All Popups screen.
    }(jQuery, document));



Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.