How to disable Cloudflare's Rocket Loader for specific scripts? WordpressHow to bypass CloudFlare rocket script if wp_enqueue_script is used to add scripts?How to detect if JavaScript is disabled?How to insert an item into an array at a specific index (JavaScript)?How do I check if a string contains a specific word?Cloudflare's Rocket Loader + Wordpress -> Ignore scripts?How does Facebook disable the browser's integrated Developer Tools?Reset Cloudflare's Rocket LoaderjQuery .css() doesn't workIgnore Cloudflare Automatic RocketLoader for specific JavaScriptWordpress script with integrity and crossoriginCloudflare Rocket loader Causing js errors ($ not defined)

How to say "respectively" in German when listing (enumerating) things

Sci-fi movie with one survivor and an organism(?) recreating his memories

Create the same subfolders in another folder

Calculate the Ultraradical

Why does `FindFit` fail so badly in this simple case?

Can the President of the US limit First Amendment rights?

Does AES-ECB with random padding added to each block satisfy IND-CPA?

How big would the ice ball have to be to deliver all the water at once?

Would an object shot from earth fall into the sun?

Would a 737 pilot use flaps in nose dive?

Fix Ethernet 10/100 PoE cable with 7 out of 8 wires alive

Creating specific options in `Manipulate[]`

What would influence an alien race to map their planet in a way other than the traditional map of the Earth

Implementation of a Thread Pool in C++

How to visualize an ordinal variable predicting a continuous outcome?

What is the logical distinction between “the same” and “equal to?”

Why has Speaker Pelosi been so hesitant to impeach President Trump?

Was the ruling that prorogation was unlawful only possible because of the creation of a separate supreme court?

French license plates

Incomplete iffalse: How to shift a scope in polar coordinate?

Top off gas with old oil, is that bad?

Beyond Futuristic Technology for an Alien Warship?

How to stop the death waves in my city?

Can you cure a Gorgon's Petrifying Breath before it finishes turning a target to stone?



How to disable Cloudflare's Rocket Loader for specific scripts? Wordpress


How to bypass CloudFlare rocket script if wp_enqueue_script is used to add scripts?How to detect if JavaScript is disabled?How to insert an item into an array at a specific index (JavaScript)?How do I check if a string contains a specific word?Cloudflare's Rocket Loader + Wordpress -> Ignore scripts?How does Facebook disable the browser's integrated Developer Tools?Reset Cloudflare's Rocket LoaderjQuery .css() doesn't workIgnore Cloudflare Automatic RocketLoader for specific JavaScriptWordpress script with integrity and crossoriginCloudflare Rocket loader Causing js errors ($ not defined)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm trying to disable Cloudflare's Rocket Loader for specific scripts. At first I'm trying to disable it for mobile slider. I tried various combinations of this (and every other I found on StackOverflow) code:



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

if ( 'writeup-owl-carousel' !== $handle )
return $tag;

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


This script is responsible for the element that I'm trying to exclude from rocket loader:



if ( ! function_exists( 'writeup_scripts' ) ) 

function writeup_scripts()

wp_enqueue_script( 'writeup-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ),'', true );




When I paste this code in functions.php, the whole element (slider) dissapears. Does anyone know what's wrong with this code? I feel like I've tried everything...










share|improve this question





















  • 1





    Try removing type='text/javascript' from the first code snippet and check again.

    – cabrerahector
    Mar 28 at 20:15











  • Unfortunately it didn't changed anything. The slider still dissapears :(

    – kacper3355
    Mar 28 at 20:37











  • Got any other ideas?

    – kacper3355
    Mar 28 at 20:51











  • Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

    – cabrerahector
    Mar 28 at 21:11











  • Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

    – kacper3355
    Mar 28 at 21:51

















0















I'm trying to disable Cloudflare's Rocket Loader for specific scripts. At first I'm trying to disable it for mobile slider. I tried various combinations of this (and every other I found on StackOverflow) code:



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

if ( 'writeup-owl-carousel' !== $handle )
return $tag;

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


This script is responsible for the element that I'm trying to exclude from rocket loader:



if ( ! function_exists( 'writeup_scripts' ) ) 

function writeup_scripts()

wp_enqueue_script( 'writeup-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ),'', true );




When I paste this code in functions.php, the whole element (slider) dissapears. Does anyone know what's wrong with this code? I feel like I've tried everything...










share|improve this question





















  • 1





    Try removing type='text/javascript' from the first code snippet and check again.

    – cabrerahector
    Mar 28 at 20:15











  • Unfortunately it didn't changed anything. The slider still dissapears :(

    – kacper3355
    Mar 28 at 20:37











  • Got any other ideas?

    – kacper3355
    Mar 28 at 20:51











  • Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

    – cabrerahector
    Mar 28 at 21:11











  • Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

    – kacper3355
    Mar 28 at 21:51













0












0








0








I'm trying to disable Cloudflare's Rocket Loader for specific scripts. At first I'm trying to disable it for mobile slider. I tried various combinations of this (and every other I found on StackOverflow) code:



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

if ( 'writeup-owl-carousel' !== $handle )
return $tag;

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


This script is responsible for the element that I'm trying to exclude from rocket loader:



if ( ! function_exists( 'writeup_scripts' ) ) 

function writeup_scripts()

wp_enqueue_script( 'writeup-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ),'', true );




When I paste this code in functions.php, the whole element (slider) dissapears. Does anyone know what's wrong with this code? I feel like I've tried everything...










share|improve this question
















I'm trying to disable Cloudflare's Rocket Loader for specific scripts. At first I'm trying to disable it for mobile slider. I tried various combinations of this (and every other I found on StackOverflow) code:



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

if ( 'writeup-owl-carousel' !== $handle )
return $tag;

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


This script is responsible for the element that I'm trying to exclude from rocket loader:



if ( ! function_exists( 'writeup_scripts' ) ) 

function writeup_scripts()

wp_enqueue_script( 'writeup-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ),'', true );




When I paste this code in functions.php, the whole element (slider) dissapears. Does anyone know what's wrong with this code? I feel like I've tried everything...







javascript php wordpress cloudflare rocket-loader






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 20:36









cabrerahector

2,4522 gold badges10 silver badges19 bronze badges




2,4522 gold badges10 silver badges19 bronze badges










asked Mar 28 at 19:50









kacper3355kacper3355

226 bronze badges




226 bronze badges










  • 1





    Try removing type='text/javascript' from the first code snippet and check again.

    – cabrerahector
    Mar 28 at 20:15











  • Unfortunately it didn't changed anything. The slider still dissapears :(

    – kacper3355
    Mar 28 at 20:37











  • Got any other ideas?

    – kacper3355
    Mar 28 at 20:51











  • Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

    – cabrerahector
    Mar 28 at 21:11











  • Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

    – kacper3355
    Mar 28 at 21:51












  • 1





    Try removing type='text/javascript' from the first code snippet and check again.

    – cabrerahector
    Mar 28 at 20:15











  • Unfortunately it didn't changed anything. The slider still dissapears :(

    – kacper3355
    Mar 28 at 20:37











  • Got any other ideas?

    – kacper3355
    Mar 28 at 20:51











  • Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

    – cabrerahector
    Mar 28 at 21:11











  • Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

    – kacper3355
    Mar 28 at 21:51







1




1





Try removing type='text/javascript' from the first code snippet and check again.

– cabrerahector
Mar 28 at 20:15





Try removing type='text/javascript' from the first code snippet and check again.

– cabrerahector
Mar 28 at 20:15













Unfortunately it didn't changed anything. The slider still dissapears :(

– kacper3355
Mar 28 at 20:37





Unfortunately it didn't changed anything. The slider still dissapears :(

– kacper3355
Mar 28 at 20:37













Got any other ideas?

– kacper3355
Mar 28 at 20:51





Got any other ideas?

– kacper3355
Mar 28 at 20:51













Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

– cabrerahector
Mar 28 at 21:11





Is the script being enqueued on your site? If so, is it getting the data-cfasync property or not?

– cabrerahector
Mar 28 at 21:11













Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

– kacper3355
Mar 28 at 21:51





Yes, the script is being enqueued on my site. How can I check if its getting the data-cfasync property?

– kacper3355
Mar 28 at 21:51












0






active

oldest

votes














Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55405819%2fhow-to-disable-cloudflares-rocket-loader-for-specific-scripts-wordpress%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55405819%2fhow-to-disable-cloudflares-rocket-loader-for-specific-scripts-wordpress%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현