My elementor is not opening in WordPress because of “cloudflare-static/rocket-loader.min.js”


In my WordPress website, I am using the Cloudflare and Elementor editor also but when I am trying to edit the page using the Elementor, my Elementor is not opening. I think it is because of the Cloudflare in my WordPress.

Cloudflare has added the script in the head and also in the footer:

<script src="" data-cf-settings="9838dd25b616f37c8176faa3-|49"></script>

So, How to exclude the script from WordPress?

Added this in my functions.php

add_filter( 'script_loader_tag', function ( $tag, $handle ) {

if ( 'script-handle' !== $handle )
    return $tag;

return str_replace( "type='text/javascript' src", ' data-cfasync="false" src', $tag     );
}, 10, 2 );

But not working.

Also tried this by adding in the functions.php:

<script data-cfasync=”false” src=”/javascript.js”></script>

But not working.

Any help is much appreciated.

Rahul Kumar 2 years 2019-10-28T01:24:57-05:00 0 Answers 212 views 0

Leave an answer