-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Gabriela Carral edited this page Apr 30, 2025
·
4 revisions
The WordPress Theme Starter Pack is a modern WordPress theme development starter pack with Webpack, SCSS, Bootstrap, and advanced development tooling.
- π― Modern JavaScript with Webpack bundling
- π SCSS preprocessing with modern CSS features
- π₯Ύ Bootstrap 5 integration
- π§° Advanced Custom Fields (ACF) support with pre-configured field groups
- π§ Comprehensive development tooling
- π± Responsive design ready
- π¨ Code formatting with Prettier
- π ESLint and Stylelint integration
- π§ͺ PHPUnit testing setup
- π Multilingual ready with .pot file
- π― Flexible content blocks system
- π WP-Env support for local development
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm (v9 or higher)
- WordPress (v6.4 or higher)
- Advanced Custom Fields PRO plugin
- Composer for PHP dependencies
-
Clone this theme into your WordPress themes directory:
cd wp-content/themes git clone https://github.com/your-username/wptsp.git cd wptsp
-
Install dependencies:
composer install npm install
-
Set up local development environment:
npm run wp-env start
-
Start development:
npm run dev
-
For production build:
npm run build
-
npm run dev
- Start development with Webpack and Gulp watch -
npm run build
- Create production-ready assets with Webpack and Gulp -
npm run format
- Format code using WordPress scripts -
npm run lint:js
- Lint JavaScript files -
npm run lint:js:fix
- Fix JavaScript linting issues automatically -
npm run lint:css
- Lint style files -
npm run lint:css:fix
- Fix style linting issues automatically -
npm run zip
- Create a ZIP archive of the theme -
npm run version
- Update version, generate changelog, and commit changes -
npm run packages-update
- Update WordPress packages -
npm run generate-pot
- Generate translation template file
wptsp/
βββ assets/
β βββ css/ # Compiled CSS files
β βββ fonts/ # Custom fonts
β βββ images/ # Theme images and icons
β βββ js/
β β βββ src/ # JavaScript source files
β βββ scss/ # SCSS source files
β βββ blocks/ # Block-specific styles
β βββ components/# Component styles
βββ build/ # Production build files
βββ config/ # Build configuration files
βββ inc/ # Theme PHP includes
βββ languages/ # Translation files
βββ template-parts/ # Reusable template parts
β βββ content/ # Content templates
β βββ flexible/ # Flexible content blocks
βββ tests/ # PHPUnit test files
βββ vendor/ # Composer dependencies
-
SCSS files are organized in the
assets/scss/
directory:- Component styles in
components/
- Block styles in
blocks/
- Global styles and variables in root directory
- Component styles in
-
JavaScript files are in
assets/js/src/
:- Entry point is
main.js
- Uses ES6+ features (transpiled by Babel)
- Entry point is
-
Template structure:
- Block templates in
template-parts/flexible/
- Content templates in
template-parts/content/
- Header/footer options in
template-parts/
- Block templates in
- JavaScript follows ESLint rules with WordPress coding standards
- SCSS follows Stylelint rules with standard SCSS config
- PHP follows WordPress coding standards
- All code is formatted using Prettier
The theme includes pre-built ACF blocks:
- Hero section
- Cards grid
- CTA (Call to Action)
- Text block
- Video embed
To create new blocks, add templates to template-parts/flexible/
and register them in inc/blocks.php
.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.