Bare-bones theme configuration using SCSS for Roots, a WordPress starter theme based on HTML5 Boilerplate & Bootstrap that will help you make better themes.
(Note: This theme was originally forked from a much earlier version of Roots, and does not compare to the current version of Roots.)
- No specific build process — use what you prefer. I prefer to start as simple as possible. Minification and concatenation is up to you, and the toolchain you prefer.
- VS Code with LiveSass for simple and easy SCSS compiling is preferred, but not required.
- I recommend using WP Rocket for optimizing asset delivery on your live site.
- Only a subset of Bootstrap CSS included by default. To add more, uncomment the
@import
's you need inassets/scss/_bootstrap.scss
. (All Bootstrap files are kept pristine and update-friendly.) - Almost no default Bootstrap JS included initially, and
assets/js/main.js
only includes theRoots
namespace + DOM-based Routing.
- Bootstrap top navbar off by default.
- Roots' “Nice search” feature is removed, preferring the WP default of using the /?s= parameter, as this makes it easier to set up Google Analytics' site search tracking.
- Google Analytics tracking code is only included if
WPBP_ENV == 'production'
and no user is logged in. (Note: theWPBP_ENV
constant is defined in the WordPress Boilerplate config package, but the theme is fully functional without it.) - All theme activation options are off by default, to prevent “accidents” when installing the theme on sites with existing content.
- No “You're using an outdated browser…” message for IE8 and below.
wpbp-before-main
Called before the main.. <main>
content wrapper.
Ideal for rendering eg. a Custom Header for your child theme.
wpbp-after-main
Called after the main.. <main>
content wrapper.