• We use a self-made WordPress theme that behaves like a SPA through Swup.js

    The problem is that the plug-in looks at whether the page uses a Gutenslider and then adds various JavaScript files & functions in the footer.

    Because Swup.js does not actually reload the page, we often experience plug-ins that no longer function properly. By placing an init function in an eventListener, the plug-ins often work correctly again.

    swup.hooks.on('content:replace', () => { }

    I currently have an empty Gutenslider in the footer so that the necessary JS files are present on all pages.

    Now I’m just looking for a function that I can call to initialize the Gutenslider. Does anyone know what function I can use for this?

    We use Gutenslider v6.1.0

    Thanks for contributing ideas!

  • The topic ‘Reinit/Reload function?’ is closed to new replies.