Skip to content

Underpin-WP/underpin-theme-boilerplate

Repository files navigation

Boilerplate for Custom Projects

This is a plugin boilerplate built on the Underpin Framework. For information on how to use this, check out Underpin's docs.

This plugin expects that Underpin has been installed as a WordPress Must-Use plugin.

Setup

  1. Install Underpin. See Underpin for more info on that
  2. Install the Template Loader
  3. Start building!

Useful Loaders

There are a handful of loaders that get used in most WordPress themes. Keep these in-mind as you work on the theme, and use them if you find you need the functionality:

  1. Block Loader Create, register, and manage WordPress blocks.
  2. Decision List Loader Create decision list registries that makes custom logic easy to extend.
  3. Menu Loader Register, and manage custom theme nav menus
  4. Meta Loader Manage custom meta to store in various meta tables
  5. Option Loader Register , and manage values to store in wp_options
  6. Rest Endpoint Loader Create, register, and manage REST endpoints
  7. Script Loader Create, and enqueue scripts
  8. Shortcode Loader Create, and render custom shortcodes
  9. Sidebar Loader Create, and manage WordPress sidebars
  10. Style Loader Create, and enqueue styles

Webpack Config

The Webpack and NPM configuration in this plugin is a barebones WordPress configuration that aligns the script dir with Underpin's default script directory. It is intentionally un-opinionated, but it is set-up and ready to be extended.

The default entrypoint is src/index.js.

Stylesheets

The default webpack config comes with Webpack's postCSS loader, and can handle SCSS and CSS files. You can override the default loader by adding a postcss file to this theme.