Optimized Bootstrap 4 WordPress starter theme based on Underscores, Understrap, & Bootstrap
While you can easily make a child theme for Spurs, we recommend using Spurs to create your next spiffy new theme. Much
like Underscores or Sage, Spurs isn’t meant to be a child theme.
Note: We reserve the right to break backward compatibility at any point, in fact we expect it. Don’t expect to
update the main theme automatically when there are updates.
Get email notifications of new updates.
Like Holger Könemann, creator of Understrap, I’m a fan of Underscores,
Bootstrap, Sass, npm, and Gulp.
The _s theme is a good starting point to develop a WordPress theme. But it is “just” a raw starter theme; it outputs
solid basic markup and WordPress functions without any layout or design.
Bootstrap 4 provides a well known and supported layout framework providing a solid, clean and responsive foundation.
Spurs is a fork of Understrap with the goals of:
Here’s how the Sass and CSS files that come with Spurs work:
/style.css
file identifies the theme inside of WordPress but it isn’t loaded by the theme and shouldn’t include any styles./css/theme.css
file and its lighter weight little brother /css/theme.min.css
provide all of the theme’s styles. Just one of these files is loaded in the WordPress theme, depending on your settings.These theme files are composed of several different SCSS sets in /spurs/sass/
loaded through /spurs/sass/theme.scss
.
```// Core files
@import "theme/variables"; // <--- Add your variables including overrides to Bootstrap or Spurs variables
@import "assets/bootstrap4"; // <--- Load Bootstrap 4 (Do not tweak)*
@import "spurs/spurs"; // <--- Loads Spurs defaults
// Optional files - If you don't use the corresponding scripts/fonts comment them out
@import "spurs/woocommerce"; // <--- Loads WooCommerce style fixes. Comment out if you aren't using WooCommerce
@import "assets/font-awesome"; // <--- Font Awesome Icon font (Do not tweak)*
@import "assets/underscores"; // <--- _s media styles
@import "theme/contact-form7"; // <-- Contact Form 7 - Bootstrap 4 support
// Theme-specific and other imports
@import "theme/theme"; // <------------ Your custom styles go here
```
*Don’t edit or tweak these files or you won’t be able to update Bootstrap or Font Awesome without overwriting your own work!
Your design customizations go into: /sass/theme
.
Add your styles to the /sass/theme/_theme.scss
file and your variables to/sass/theme/_variables.scss
.
You can remove or comment out files or SCSS sets you don’t need. Or @import additional .scss files as needed into a file in /sass/theme/
.
Page templates are located in spurs/page-templates/
.
blank.php
template is useful when working with various page builders and can be used as a starting blank canvas.empty.php
template displays a header and a footer only. A good starting point for landing pages.full-width.php
template has full width layout without a sidebar.left-sidebar.php
- layout with a sidebar (col-4)
on the left of the content (col-8)
right-sidebar.php
- layout with a sidebar (col-4)
on the right of the content (col-8)
both-sidebars.php
- layout with two slim sidebars (col-3)
on left and right of main content (col-6)
spurs/templates/global/
spurs/templates/loop/
spurs/templates/sidebar/
/wp-content/themes/
Spurs uses npm, Gulp, Sass, and Browsersync and automatically takes care of compiling, linting, compressing and other nifty automation tasks.
Make sure you have installed:
npm install -g gulp-cli
npm install -g browser-sync
Then open your terminal and browse to the location of your Spurs copy and run: $ npm install
to install theme dependencies.
To set up Browsersync, change the browserSyncOptions
proxy to reflect your environment in the beginning of the /gulpfile.js
file.
{
"browserSyncOptions" : {
"proxy": "localhost/theme_test/", // <----- YOUR HOST GOES HERE
"notify": false
},
...
};
$ gulp watch
- compile your Sass and JS files on the fly$ gulp watch-bs
- compile with Browsersync
Check out the gulpfile.js
file to see the other available Gulp commands.
The front-page slider is widget driven. Simply add more than one widget to widget position “Hero”.
Just add a new file to the themes root folder called rtl.css. Add all alignments to these instructions.
See changelog