How to put CSS and JS in a specific page ?

Highlighted
Highlighted
Explorer
81 8 11

you can load CSS js based on a page template

you can add this code theme/layout/theme.liquid

{% if template contains 'customers' %}
  <script src="{{ 'shopify_common.js' | shopify_asset_url }}" defer="defer">
</script>
 {{ 'customer.css' | asset_url | stylesheet_tag }} 

  {% endif %}

 

0 Likes