Source Folders#
Keep asset source files in resources:
- main.css
- main.js
- logo.svg
- picture.jpg
- brand.woff2
resources is where you work. TemplateX and Vite turn those files into browser-ready assets when you build or publish the theme.
The Basic Pattern#
Use normal HTML paths in your views and layouts:
- link CSS from the layout
- load JavaScript from the layout
- put theme images and fonts in
resources/assets - let TemplateX rewrite local paths to the built files
You should not need get_theme_file_uri() for normal theme-owned assets.