Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi Matthew, I’m here to help you as an independent developer.

    By default, in the latest version of Elementor, the Swiper enqueue script/style is disabled. To enable it in our custom-created widgets, we need to add the following code in the custom widget class:

    public function get_style_depends(): array {
    return [ 'swiper', 'e-swiper' ];
    }

    Example of custom elementor widget:

    class Testimonials_Swiper_Widget extends \Elementor\Widget_Base { 
    public function get_style_depends(): array {
    return [ 'swiper', 'e-swiper' ];
    }

    public function get_name() {
    return 'testimonials-slider';
    }
    public function get_title() {
    return esc_html__( 'Testimonials Slider', '' );
    }
    }
Viewing 1 replies (of 1 total)