• Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Enqueued Java Script not working

ceylonthemes

ceylonthemes

New Member
custom widget .js enqueued and working on localhost. But, It is not working on server ? Latest elementor free version used.

code in theme functions.php file

if ( in_array( 'elementor/elementor.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

add_action('elementor/editor/before_enqueue_scripts', function() {
wp_register_script( 'my-custom-widgets', get_theme_file_uri('/my.js') , array( 'jquery' ),'', true );
wp_enqueue_script( 'my-custom-widgets' );

});

}
 

Latest Resources

Other Elementor Resources

elementor official

Still stuck? Ask the forum

Post your question with a screenshot and a link if you can, and a member will usually reply within a day. Free to join, no sales pitch.

Create a free account
Top