Awesome this has worked to a degree. Before calling wp-load.php i set the following constants. The plugin is now working correctly. Thank you for the help, this plugin is fantastic
define(“AUTOPTIMIZE_INIT_EARLIER”, true);
define(“CONCATENATE_SCRIPTS”, true);
define(“AUTOPTIMIZE_HOOK_INTO”, “init”);
The only issue i have is with the lazyload system that is built into my theme. When i first installed the plugin this broke across the entire site. In the advanced settings i selected the option for “Force JavaScript in <head>”. This resolved the error. However, when i trigger the plugin the run via the constants above, the lazyload is broken again.
-
This reply was modified 7 years, 4 months ago by dano1066.