[WordPress] Fixed Enlighter (Syntax Highlighter) not working when Autoptimize is active !!!

From me previous blog  Upgrade Blog 02-JAN-2022 (In Thai language)

I have change many thing to my blog and start Autoptimize plugin to make a good score on google page speed

but some blogs the Syntax Highlighter is not working.

Cause

  • In Microsoft Edge DevTools in show error
Enlighter Error: MooTools Framework not loaded yet!
  • and the MooTools is a part of Autoptimize which cache js and css optimizer for your WordPress.

Solution

  • In Autoptimize Plugin setting. Just add the Enlighter directory path (wp-content/plugins/enlighter/) to section: “Exclude scripts from Autoptimize”.

Result

  • Syntax Highlighter is working. amazing ^__^

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts sent to your email.