Dequeing scripts/styles
-
Hi,
I am working on speeding up the site and I found that some scripts should be removed. One such example is CSS for Guttenberg blocks when I am not using Guttenberg. CSS is still added.I am hooking into ‘wp_enqueue_scripts’ and trying to dequeue those styles. This does not work because it seems AO already processed those files and included them.
At the moment, I am solving it by adding relevant file to the AO list of files not to optimise and then my hook works normally.
I have a feeling this is not the best way. Is there a hook I can use that is called after styles/scripts are loaded and before AO has a chance to process them?
Thanks,
Rudolf
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Dequeing scripts/styles’ is closed to new replies.