Simppple is a Wordpress theme designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs. A multitude of possibilities open up with just a few adjustments to color and typography. Simppple comes with some style variations to help the creativity of the site building process, it's fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4.
This parent theme is not meant to be modified inside a Wordpress project. If you want to add new acf/react blocks or patterns please put it inside the child theme folder (Child theme template).
This parent theme will have it's own updates (maybe once a year idk π€·ββοΈ).
You can download the theme via Wordpress.org or Github
- π Simppple
- π src
- Contains assets that will be compiled (scss, js, fonts, img, etc...)
- π fonts
- π icomoon
- π img
- π scripts
- π styles
- π build
- Contains all the compiled assets (css, js, fonts, img, etc...)
- π blocks
- π core
- π woocommerce
- π patterns
- π inc
- Contains PHP files that are used to customize the theme & assist in theme development
- π pattern
- Everything related to custom patterns (category creation, etc...)
- π theme-customization
- Everything related to deeper theme customization (removing default colors, unnecessary menus, etc...)
- π lang
- Contains translation files specific to the theme
- π parts
- Theme template parts (Header, Footer, etc...)
- π styles
- All the style variations of the theme
- π templates
- Pages templates of the theme (404, archive, single, product, etc...)
- theme.json
- Contains all possible global configuration for the theme's styles
- functions.php
- Calls PHP files that are used to customize the theme & assist in theme development
- style.css
- Contains useful theme information (author, version, etc...)
- screenshot.png
- Presentation image of the theme
- π src
If not already done, run npm install in this directory
We use vite.js to facilitate and optimize our development.
The list of development scripts is listed below:
| NPM Command | Action |
|---|---|
| npm run watch | starts a local development server accessible directly on local.your-host.com, compiles and reloads static files (*.scss, *.js) on each change. |
| npm run build | compiles simppple theme files (*.scss, *.js) and deploys static files to the build/ directory of the theme. |
| npm run beautify:all | lints, formats theme files (*.php, *.scss, *.js) |
We use Husky to manage Git hooks, ensuring code quality and consistency before commits and pushes.
It is strongly recommended to install all dependencies with npm install before starting development. This will set up Husky and all necessary tools to ensure code quality.
Husky will automatically run checks when you attempt to commit changes. Important: Commits will fail if any linting errors or code quality issues are detected. You must fix all issues before your code can be committed to the repository. This strict approach ensures that only high-quality code enters the codebase.
If you need to bypass these checks in exceptional circumstances (not recommended), you can use the --no-verify flag with your git commit command.
The pre-commit hook runs automatically when you attempt to commit changes, performing the following tasks:
- Runs lint-staged to process only the files that are staged for commit
- Prevents commits if any of the checks fail
Lint-staged runs specific scripts based on file types:
| File Type | Scripts Run |
|---|---|
| *.php | PHP-CS-Fixer to ensure consistent formatting & PHPStan to enforce coding standard |
| *.scss | Stylelint to enforce consistent styling |
| _.js, _.jsx | ESLint to check for JavaScript errors and enforce coding standards |
| *.{js,jsx,scss} | Prettier to ensure consistent formatting |
This ensures that all code committed to the repository meets our quality standards and maintains a consistent style.
The pre-commit hook performs several checks before allowing a commit to proceed:
- Code Quality Checks: Runs lint-staged to verify that all staged files meet coding standards
- Type Checking: Ensures TypeScript files have proper type definitions
- Unit Tests: Runs relevant unit tests that might be affected by your changes
- Build Verification: Ensures the project can build successfully with your changes
If any of these checks fail, the commit will be aborted, and you'll need to fix the issues before trying again.
The branch name validation hook ensures that all branch names follow our standardized naming convention:
- Format:
type/description(e.g.,feature/add-login-page,fix/header-alignment) - Allowed types:
feature,bugfix,fix,hotfix,release,chore,docs,refactor,test - Description must use kebab-case (lowercase with hyphens)
- No uppercase letters, underscores, or special characters allowed
This standardization makes it easier to track work and understand the purpose of each branch at a glance.
We follow the Conventional Commits standard for commit messages, enforced by commitlint:
- Format:
type(scope): subject(e.g.,feat(auth): add login functionality) - Types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert - Scope: Optional component/module name in parentheses
- Subject: Short description in present tense, no capital first letter, no period at the end
- Body: Optional detailed description after a blank line
- Footer: Optional, for referencing issues (e.g.,
Fixes #123)
Example of a complete commit message:
feat(auth): add password reset functionality
Implement the password reset flow including email notification
and secure token validation.
Fixes #456
- Prevents bad code from entering the codebase
- Maintains consistent code style across the project
- Catches errors early in the development process
- Reduces the need for style-related code reviews
Gutenberg's native editor blocks can be overridden by creating files in the blocks/core/ (see README) directory of the theme.
Woocommerce's native Gutenberg blocks can be overridden by creating files in the blocks/woocommerce/ (see README) directory of the theme.
ACF (Advanced Custom Fields) blocks should be created and edited in the blocks/acf/ directory of the child theme (see README).
React blocks should be created and edited in the blocks/react/ directory of the child theme (see README).
Patterns can be created and edited in the patterns/ (see README) directory of the theme.
Parts can be created and edited in the parts/ (see README) directory of the theme.
Templates can be created and edited in the templates/ (see README) directory of the theme.
To generate the .pot file (from the theme's directory):
wp i18n make-pot . lang/simppple.pot --domain=simppple --exclude=node_modules,vendor,lang --include=*.php,buildTo generate the translation json files for JS (from the theme's directory):
wp i18n make-json lang/ --no-purge- Quick Article
- Use the designated child theme Simppple-child
- Prefix functions
- Automatic release
- Automatic updates
- Translations (English)
- Woocommerce compatibility
- Automatic pot/po/mo json translation files
To learn more about using and customizing the theme: