Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    Can you please explain a bit more?

    Thread Starter Designrest

    (@designrest)

    Now if register Styles or Scripts by this function

     public function __construct($data = [], $args = null) {
          parent::__construct($data, $args);
    
          wp_register_script( 'script-handle', 'path/to/file.js', [ 'elementor-frontend' ], '1.0.0', true );
       }

    Scripts or Styles include every page.
    ——————————————

    I Need to include a Scripts or Styles, only the page that used this widget.
    Because affect with web performance page speed

    • This reply was modified 2 years, 6 months ago by Designrest.
    • This reply was modified 2 years, 6 months ago by Designrest.

    Hi,
    Thank you for elaborating.

    This will have to go through our developer’s forum as this is a very unique request that needs to override the whole code to separate that widget if possible.

    Please log into our developers GitHub forum and get assistance there –
    https://github.com/elementor/elementor

    You can try HTML widget in that page (at the beginning) and write the code in it.

    Thread Starter Designrest

    (@designrest)

    @tanvirroky It not my request I Asking about widget development not use widget.

    Thread Starter Designrest

    (@designrest)

    @talmo Thanks you for helping me. Elementor Team

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to load a Scripts & Styles, only the page that used this widget?’ is closed to new replies.