Theme development
Flow is a theme of the Thesky9 CMS. Its code is in platform/themes/flow. For the framework itself (hooks, filters, form builder, commands) read the Development documentation.
Folder structure
| Path | What it holds |
|---|---|
assets/sass, assets/js | The source of the CSS and JavaScript. Edit these files, never the built files. |
public/ | The built CSS, JavaScript, images and fonts. Do not edit the files of public/css and public/js by hand: the next build overwrites them. |
functions/functions.php | Theme setup: page templates, widget areas (sidebars), image sizes and helper functions. |
functions/shortcodes.php | The shortcodes of the theme (see Short code). |
functions/theme-options.php | The fields of the Theme options tabs. |
layouts/ | The page layouts (default, full, homepage, no-breadcrumbs, right-sidebar). |
views/ | The templates of posts, categories, tags, galleries, authors, pages, search and the error pages. |
partials/ | The header, the footer and the reusable parts. partials/shortcodes holds the template and the admin form of each shortcode. |
widgets/ | The widgets of the theme (see Widgets). |
lang/ | The theme translations (en.json, vi.json and 19 other languages). |
theme.json, config.php | The theme name and version, and the assets loaded on every page. |
Change the styles
Edit the Sass files of assets/sass, then build from the root folder of the site:
bash
npm install
npm run prodThe build compiles the Sass and the JavaScript with Vite and writes the result to public/. For small changes that do not need a build, use Custom CSS.
Customize safely
To keep your changes when the theme is updated, use a child theme. See Child theme development.