Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The best WordPress starter theme with a modern front-end development workflow. Based on HTML5 Boilerplate, gulp, Bower, and Bootstrap.
PHP JavaScript CSS

Merge pull request #1546 from roots/html5-gallery

Use WP core's HTML5 gallery markup
latest commit f98db69e3b
@retlehs retlehs authored
Failed to load latest commit information.
assets Update newer versions of dependencies
lang Update sage.pot
lib Use WP core's HTML5 gallery markup
templates fix timezone offset in ISO 8601 date in byline
.bowerrc Adds a bowerrc
.editorconfig Add EditorConfig
.gitignore Update .gitignore
.jscsrc Update jscs validateJSDoc to jsDoc rule
.jshintrc remove trailing option
.travis.yml cache bower and node directories
404.php Simplify 404 page Remove ConditonalTagCheck class Reference contributing guidelines guidelines repo Formatting, adding/updating links Nav cleanup is in Soil now, updating documentation.
base.php Moved opening html tag to base.php
bower.json Update newer versions of dependencies
functions.php Remove ConditonalTagCheck class
gulpfile.js Merge pull request #1496 from martinvd/patch-1
index.php Ref #1033 - better support for CPT templates
package.json Update newer versions of dependencies
page.php Update page.php
ruleset.xml Verify that operators have valid spacing surrounding them [ci skip]
screenshot.png Update screenshot resolution to 880x660, change to blank image
search.php Add search templates
single.php Ref #1033 - better support for CPT templates
style.css Sage 8.2.1 [ci skip]
template-custom.php :mag:


Build Status devDependency Status

Sage is a WordPress starter theme based on HTML5 Boilerplate, gulp, Bower, and Bootstrap Sass, that will help you make better themes.


Prerequisite How to check How to install
PHP >= 5.4.x php -v
Node.js 0.12.x node -v
gulp >= 3.8.10 gulp -v npm install -g gulp
Bower >= 1.3.12 bower -v npm install -g bower

For more installation notes, refer to the Install gulp and Bower section in this document.


  • gulp build script that compiles both Sass and Less, checks for JavaScript errors, optimizes images, and concatenates and minifies files
  • BrowserSync for keeping multiple browsers and devices synchronized while testing, along with injecting updated CSS and JS into your browser while you're developing
  • Bower for front-end package management
  • asset-builder for the JSON file based asset pipeline
  • Sass Bootstrap
  • Theme wrapper
  • ARIA roles and microformats
  • Posts use the hNews microformat
  • Multilingual ready and over 30 available community translations

Install the Soil plugin to enable additional features:

  • Cleaner output of wp_head and enqueued assets
  • Cleaner HTML output of navigation menus
  • Root relative URLs
  • Nice search (/search/query/)
  • Google CDN jQuery snippet from HTML5 Boilerplate
  • Google Analytics snippet from HTML5 Boilerplate


Clone the git repo - git clone and then rename the directory to the name of your theme or website.

If you don't use Bedrock, you'll need to add the following to your wp-config.php on your development installation:

define('WP_ENV', 'development');


Edit lib/config.php to enable or disable theme features

Edit lib/init.php to setup navigation menus, post thumbnail sizes, post formats, and sidebars.

Theme development

Sage uses gulp as its build system and Bower to manage front-end packages.

Install gulp and Bower

Building the theme requires node.js. We recommend you update to the latest version of npm: npm install -g npm@latest.

From the command line:

  1. Install gulp and Bower globally with npm install -g gulp bower
  2. Navigate to the theme directory, then run npm install
  3. Run bower install

You now have all the necessary dependencies to run the build process.

Available gulp commands

  • gulp — Compile and optimize the files in your assets directory
  • gulp watch — Compile assets when file changes are made
  • gulp --production — Compile assets for production (no source maps).

Using BrowserSync

To use BrowserSync during gulp watch you need to update devUrl at the bottom of assets/manifest.json to reflect your local development hostname.

For example, if your local development URL is you would update the file to read:

  "config": {
    "devUrl": ""

If your local development URL looks like http://localhost:8888/project-name/ you would update the file to read:

  "config": {
    "devUrl": "http://localhost:8888/project-name/"


Sage documentation is available at


Contributions are welcome from everyone. We have contributing guidelines to help you get started.


Keep track of development and community news.

Something went wrong with that request. Please try again.