Skip to content

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 ​

PathWhat it holds
assets/sass, assets/jsThe 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.phpTheme setup: page templates, widget areas (sidebars), image sizes and helper functions.
functions/shortcodes.phpThe shortcodes of the theme (see Short code).
functions/theme-options.phpThe 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.phpThe 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 prod

The 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.