Can't see custom.js under assets for studio theme

can’t see custom.js under assets for studio theme, how would that be called for studio theme?
Thank you!

Hi, MrAndersonn

You may create that file yourself and call it into the theme for use. Many themes have different file structures, so depending on the theme, it may or may not be available.

Best,
Esther

Hi @MrAndersonn ,

Please check for existing JavaScript files:

Navigate to Online Store > Themes in your Shopify Admin.
Select Edit Code for the Studio theme.
In the Assets folder, look for any existing JavaScript files, such as theme.js or custom-scripts.js. These files may already handle custom scripts.

Hope it helps. If not, let me know.

Regards,

Hi @MrAndersonn ,

The inclusion of JavaScript (JS) code varies depending on the theme.

If you wish to add JS code, you may:

  1. Insert it directly into the theme.js file, which contains the primary scripts of the theme.
  2. Alternatively, embed the JS code directly into the theme.liquid file, typically before the tag to ensure optimal page performance.

Please let me know if you require further assistance.

Daisy