Forums Forums Search & Filter Pro Ajax search results with > divi plugins, Portfolio Posts Pro

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #134357

    Hello again, you’ve been helping me sort and filter blog posts with the Divi theme and it works great. Your help has been amazing.

    I’ve added a plugin called Portfolio Posts Pro (https://diviplugins.com/downloads/portfolio-posts-pro/) which lets me open Divi posts in a lightbox. I added the ‘et_pb_salvattore_content’ class to the plugin module. This works very similar to the built in Divi Blog module, as well as the built in Divi Filterable Portfolio module and the results are sorting properly etc.

    The lightbox works fine on the initial page load. It opens with an animation over the search results with a close button.

    Once you’ve applied the search filter to the page, the lightbox opens to a new URL, and you have to use the back button, losing all previous search results.

    I wonder if there’s a quick way to make sure the lightbox always opens over the search results page and not to a new URL…

    I hope that makes sense.

    Trevor
    #134362

    Ah, if you look at the script part of my setup for Divi, there are two lines that reapply Salvattore. You need some code on the new lines straight after those two lines to reapply the code for your lightbox. You may need to ask the author, something like, ho do I reapply the lightbox after Ajax runs? Show them the script you have so far (my script).

    Anonymous
    #134368

    Thanks, will do!

    Anonymous
    #134776
    This reply has been marked as private.
    Trevor
    #134782

    That is what I said. Whoever replied is saying, you need to reapply the lightbox to these new elements, but I do not know how. If they wrote the script, they should know how.

    Anonymous
    #134797

    Understood. Thanks!

    Anonymous
    #134827
    This reply has been marked as private.
    Trevor
    #134829

    OK, but it gives me a place to look. Tomorrow.

    Anonymous
    #135695

    Thanks Trevor, I’ve contacted Divi support as well, inquiring how to reapply their lighbox after ajax runs, but I don’t think they understood the ask. I’ve resubmitted my ticket, attempting a better explanation and hoping for a better outcome… We will see.

    Anonymous
    #135934

    Hi Trevor just to resolve this thread, Divi gave me the following addition to your code and it seems to be working correctly et_pb_image_lightbox_init($( '.et_pb_lightbox_image'));:

    <script>(function ( $ ) {
    "use strict";
    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    console.log("ajax complete");
    var grids = document.getElementsByClassName('et_pb_salvattore_content');
    salvattore['register_grid'](grids[0]);
    salvattore['recreate_columns'](grids[0]);
    et_pb_image_lightbox_init($( '.et_pb_lightbox_image'));
    });
    
    }(jQuery));</script>

    Thanks for your help!!

Viewing 10 posts - 1 through 10 (of 10 total)