Elementor widgets are not functional while being applied as part of an Elementor template inside an If-So trigger

Some Elementor Elements (basically, those using javascript) might not work as expected while If-So’s Page Caching Compatibility option is enabled. The elements are applied as part of an Elementor Template embedded inside If-So using the template’s shortcode.

Luckily, the fix is simpler than describing the problem 🙂

Simply, paste the code below at the end of your functions.php file.

wp_register_script( 'ifso-dummy-enqueue-to-attach-to', '',); wp_enqueue_script( 'ifso-dummy-enqueue-to-attach-to' ); wp_add_inline_script( 'ifso-dummy-enqueue-to-attach-to', " document.addEventListener('ifso_ajax_triggers_loaded',function(){ elementorFrontend.init(); });");