A starter theme for WordPress, designed to give you a base to use when creating your own WordPress theme.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fonts/open-sans Move assets out of their own directory Jul 16, 2013
images Move assets out of their own directory Jul 16, 2013
includes Initial commit Jul 14, 2013
js Remove compiled assets from repo Aug 11, 2013
scss Move assets out of their own directory Jul 16, 2013
.gitignore Add Composer files to .gitignore Aug 19, 2013
Gruntfile.js Move JSHint options into Gruntfile Dec 24, 2013
README.md Correct URL to Installing Compass wiki page Sep 1, 2013
attachment-image.php Initial commit Jul 14, 2013
comment.php Update DocBlock subpackages Jul 19, 2013
comments-loop-nav.php Update DocBlock subpackages Jul 19, 2013
comments-loop.php Update DocBlock subpackages Jul 19, 2013
comments.php Update DocBlock subpackages Jul 19, 2013
composer.json Add Composer file Aug 19, 2013
config.rb Use Grunt to move CSS files to root instead of having Compass generat… Jul 16, 2013
content-aside.php Update DocBlock subpackages Jul 19, 2013
content-attachment.php Update DocBlock subpackages Jul 19, 2013
content-audio.php Update DocBlock subpackages Jul 19, 2013
content-chat.php Update DocBlock subpackages Jul 19, 2013
content-gallery.php Update DocBlock subpackages Jul 19, 2013
content-image.php Update DocBlock subpackages Jul 19, 2013
content-link.php Update DocBlock subpackages Jul 19, 2013
content-page.php Update DocBlock subpackages Jul 19, 2013
content-quote.php Update DocBlock subpackages Jul 19, 2013
content-status.php Update DocBlock subpackages Jul 19, 2013
content-video.php Update DocBlock subpackages Jul 19, 2013
content.php Update DocBlock subpackages Jul 19, 2013
footer.php Initial commit Jul 14, 2013
functions.php Update functions.php for Hybrid Core 1.6 Aug 6, 2013
header.php Update DocBlock subpackages Jul 19, 2013
index.php Initial commit Jul 14, 2013
license.txt Initial commit Jul 14, 2013
loop-error.php Update DocBlock subpackages Jul 19, 2013
loop-meta.php Update DocBlock subpackages Jul 19, 2013
loop-nav.php Update DocBlock subpackages Jul 19, 2013
loop.php Update Hybrid Core to 1.6 Aug 6, 2013
menu-primary.php Update DocBlock subpackages Jul 19, 2013
menu-secondary.php Update DocBlock subpackages Jul 19, 2013
menu-subsidiary.php Update DocBlock subpackages Jul 19, 2013
package.json Use load-grunt-tasks instead of matchdep Dec 24, 2013
screenshot.png Initial commit Jul 14, 2013
sidebar-primary.php Update DocBlock subpackages Jul 19, 2013
sidebar-secondary.php Update DocBlock subpackages Jul 19, 2013
sidebar-subsidiary.php Update DocBlock subpackages Jul 19, 2013

README.md

Theme Boilerplate

Theme Boilerplate is a starter theme for WordPress, designed to give you a base to use when creating your own WordPress theme.

Theme Boilerplate is built with Hybrid Core, Sass and Compass. It uses Grunt for build automation, and Composer for dependency management.

Getting Started

Clone the repo

First of all, clone the boilerplate using Git into a new theme directory (replace my-awesome-theme with the slug of your theme):

git clone https://github.com/bungeshea/theme-boilerplate my-awesome-theme
cd my-awesome-theme

Next, rename the boilerplate remote:

git remote rename origin boilerplate

If you're planning to deploy this theme using Git, add your own origin remote:

git remote add origin https://github.com/your-username/my-awesome-theme

Rebranding

You might like to rebrand the theme templates with the name of your theme. This can be accomplished by performing several search-and-replaces on the theme templates:

  1. Search for 'theme-boilerplate' to capture the text domain.
  2. Search for boilerplate_ to capture all the function names.
  3. Search for Theme_Boilerplate to capture DocBlock packages.
  4. Search for Theme Boilerplate to capture comments.
  5. Search for boilerplate- to capture prefixed handles.

Also open up scss/style.scss and package.json and manually replace the information contained in those files. scss/style.css is used by WordPress to determine the theme information, and package.json is used by node when installing modules such as Grunt plugins.

Building the theme

Theme Boilerplate requires Composer, Grunt, and Compass to be installed.

Once you have installed those three software by following the instructions on the linked pages, you can ready to build the theme. Initially, you will need to install Composer packages and Node modules:

composer install
npm install

The next step is to build the assets. This is done using Grunt. To compile Sass into CSS, minify the compiled CSS, and minify and concatenate JavaScript, all you need to do is run the default task like so:

grunt

Compressing images is not available through the default task, and must be ran manually:

grunt imagemin

Once you have run the default task for the first time, you can run the watch task which will poll for changed files and run the appropriate tasks on them. If you have the LiveReload browser extension installed, you can enable it when running the watch task, and everything will just work.

grunt watch

Staying up to date

When a new version of Theme Boilerplate is released, you can pull in the changes using Git:

git pull boilerplate master

Make sure all of your changes are committed first.