A simple WordPress theme boilerplate. Uses a lot of BlankSlate's base code but adds code indentation, a gruntfile, and some other goodness.
- Prebuilt
gruntfile.js
which uses grunt-contrib-less, grunt-postcss (with autoprefixer), and grunt-contrib-watch - A
bower.json
file that contains popular front-end packages - Pre-registered ACF options page
- Hook for adding a responsive container (with class
.video-container
) around WordPress' sweet automatic WYSIWYG video embeds - Some basic LESS code organization
- NPM (Node.js)
- Grunt.js command line utility
npm install -g grunt-cli
- Bower command line utility
npm install -g bower
- Using your favorite editor, run a find-and-replace, replacing 'Start-Here' and 'starthere' for whatever you want to name your custom theme.
- Assuming the requirements are met, open your terminal,
cd
into the theme directory and runnpm install
(you'll only have to do this once per project). After all your NPM packages have been installed, runbower install
to install front-end dependencies. - Run
grunt
. - Develop the crap out of your custom theme.
- Only the most common templates in the template hierarchy have been left in the root of the theme. All other templates are stored in
_partials/themes
. Nothing magical here; to start using one of the templates in_partials/themes
, simply copy it to the root. - It's best not to modify
functions.php
. Instead, add a new file in_partials/functions
and load it using_partials/functions/_loader.php
. - When adding a new functions file, the naming convention is
<action/filter name>.php
. If there is no action or filter, the naming convention is<function name>.php
. If you have multiple functions in a given file with no actions or filters, the naming convention isshame_<whatever you want>.php
(go make a plugin).