How to add custom JavaScript via Microthemer

How to add custom JavaScript via Microthemer

To summarise the above video:

  • Go to View > Code editor > JS to enter JavaScript code
  • The code you enter will be added to an external JavaScript file: wp-content/micro-themes/active-scripts.js
  • Do not enter script tags, as these are not necessary when adding code to a JavaScript file
  • You can use jQuery by adding the document.ready function.
  • You can load native WordPress JS libraries via General > JS libraries
  • Use Ctrl + S to save your JavaScript and reload the page
  • Microthemer will report any JS errors at the top right of the screen
Close