WP-SETS is a modern WordPress theme scaffold designed with the Site Editor in mind. It provides a solid foundation for creating custom block themes using the latest WordPress features.
- Full Site Editing (FSE) support
- PHP_CodeSniffer integration with WordPress Coding Standards
- Sass compilation for styles
- Utilizes gulp-wp for efficient WordPress theme development
- WordPress 6.0+
- PHP 7.4+
- Node.js 14+
- Composer
- Clone this repository into your WordPress themes directory:
git clone https://github.com/philhoyt/wp-site-editor-theme-scaffold.git your-theme-name
After cloning the repository, you'll want to replace the default theme information with your own. Make sure to use case-sensitive search to avoid unintended replacements. Here are the strings you need to replace throughout the project:
Theme name: WP-SETS
Replace this with your desired theme name (e.g., "My Theme")
Slug: wpsets
Replace this with your theme's slug. Use lowercase letters and hyphens (e.g., "mytheme")
Namespace: WPSETS
Replace this with your theme's namespace. Use uppercase letters (e.g., "MYTHEME")
Important files to check:
style.css
: Update theme informationpackage.json
: Update name and descriptioncomposer.json
: Update name if necessaryphpcs.xml
: Update the ruleset nameinc/setup.php
: Update function prefixes and namespaceslanguages/wpsets.pot
: Rename this file and update its contents
-
Navigate to the theme directory:
cd your-theme-name
-
Install PHP dependencies:
composer install
-
Install Node.js dependencies:
npm install
To start development:
- Run the development script:
npm run start
Note: This project uses gulp-wp, a Gulp-based build tool specifically designed for WordPress theme development. It handles tasks such as Sass compilation, JavaScript bundling, and more.
To build the theme for production:
- Run the build script:
npm run build
This will compile and minify all assets for production use.
To lint your PHP files:
npm run lint:php
To automatically fix some PHP linting issues:
npm run lint:php:fix
This project is licensed under the GNU General Public License v2 or later.