WordPress starter theme with a modern development workflow
Built with
Official Website | Documentation | Change Log
Supporting
Sage is an open source project and completely free to use.
However, the amount of effort needed to maintain and develop new features and products within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider donating using the links below:
About Sage
Sage is a productivity-driven WordPress starter theme with a modern development workflow.
The main
branch currently tracks Sage 10 which is in active development. Looking for Sage 9 or the latest Sage 10 beta release? See releases.
Features
- Harness the power of Laravel and its available packages thanks to Acorn.
- Clean, efficient theme templating utilizing Laravel Blade.
- Lightning fast frontend development workflow powered by Bud.
- Out of the box support for TailwindCSS.
Requirements
Make sure all dependencies have been installed before moving on:
Theme installation
Install Sage using Composer from your WordPress themes directory (replace your-theme-name
below with the name of your theme):
# @ app/themes/ or wp-content/themes/
$ composer create-project roots/sage your-theme-name
To install the latest development version of Sage, add dev-main
to the end of the command:
$ composer create-project roots/sage your-theme-name dev-main
Theme structure
themes/your-theme-name/ # β Root of your Sage based theme
βββ app/ # β Theme PHP
β βββ Providers/ # β Service providers
β βββ View/ # β View models
β βββ admin.php # β Theme customizer setup
β βββ filters.php # β Theme filters
β βββ helpers.php # β Helper functions
β βββ setup.php # β Theme setup
βββ bootstrap/ # β Acorn bootstrap
β βββ cache/ # β Acorn cache location (never edit)
β βββ app.php # β Acorn application bootloader
βββ config/ # β Config files
β βββ app.php # β Application configuration
β βββ assets.php # β Asset configuration
β βββ filesystems.php # β Filesystems configuration
β βββ logging.php # β Logging configuration
β βββ view.php # β View configuration
βββ composer.json # β Autoloading for `app/` files
βββ composer.lock # β Composer lock file (never edit)
βββ public/ # β Built theme assets (never edit)
βββ functions.php # β Theme bootloader
βββ index.php # β Theme template wrapper
βββ node_modules/ # β Node.js packages (never edit)
βββ package.json # β Node.js dependencies and scripts
βββ resources/ # β Theme assets and templates
β βββ fonts/ # β Theme fonts
β βββ images/ # β Theme images
β βββ scripts/ # β Theme javascript
β βββ styles/ # β Theme stylesheets
β βββ views/ # β Theme templates
β βββ components/ # β Component templates
β βββ forms/ # β Form templates
β βββ layouts/ # β Base templates
β βββ partials/ # β Partial templates
βββ screenshot.png # β Theme screenshot for WP admin
βββ storage/ # β Storage location for cache (never edit)
βββ style.css # β Theme meta information
βββ vendor/ # β Composer packages (never edit)
βββ bud.config.js # β Bud configuration
Theme setup
Edit app/setup.php
to enable or disable theme features, setup navigation menus, post thumbnail sizes, and sidebars.
Theme development
- Run
yarn
from the theme directory to install dependencies - Update
bud.config.js
with your local dev URL
Build commands
yarn dev
β Compile assets when file changes are made, start Browsersync sessionyarn build
β Compile assets for production
Documentation
Contributing
Contributions are welcome from everyone. We have contributing guidelines to help you get started.
Sage sponsors
Help support our open-source development efforts by becoming a sponsor.
Community
Keep track of development and community news.
- Participate on the Roots Discourse
- Follow @rootswp on Twitter
- Read and subscribe to the Roots Blog
- Subscribe to the Roots Newsletter
- Listen to the Roots Radio podcast