I need Rocket loader to ignore some specific script that I enqueue using wp_enqueue_script()
, So I need to add data-cfasync="false"
to the script tag. But since I enqueue a js file via function.php
, I have no tag to add this to it.
Is there any way to do that?
1 comment
Comments are closed.
I had a similar problem and this code added the attribute correctly.
Add this code snippet to your functions.php file to disable cloudfare for your specific script only. Just change YOUR_SCRIPT_HANDLE_HERE accordingly.