1.0.1
Bolts WP is your new favourite developer theme (at least for WordPress) - tough enough to power (and easily maintain) websites of any shape and size, yet so simple that you can become a power user within a day. It focuses on removing complexity and streamlining development without creating a whole new workflow. Its not trying to recreate the wheel, just make it rounder.
Bolts WP has a modern workflow and many of the build tools you´ve come to love and expect, out of the box:
As for the PHP, Bolts WP is component oriented and features helpers to keep your code as DRY as possible. Just use the component()
function, pass in your data and never write any markup in your page templates again.
The theme also features a lot of handy functions and cleaning defaults, removing bloat and filling WP's blatant gaps, making the workflow more normalized and easy to use.
git clone
in your themes directory to install the themenpm install
to install all npm packagesnpm run dev
bundles a unminified development version of the themenpm run watch
bundles a development version every time a SCSS or JS file changesnpm run build
bundles a production ready theme.Bolts WP features a couple of defaults used both during the init, but also by some of our functions. They are all configurable with define()
, that should be done in functions.php
.
Name | Type | Default Value |
---|---|---|
BOLTS_WP_DEFAULT_MENU_LOCATION |
Bool | false |
Return an array of page ids that match the specified template
Return the first page id that matches a template
Return whether the current (or specified) post matches a template
Determine if a post has a specific post type
Return the title of a post
Return the content of a post
Return the excerpt for a post (manual or automatically generated)
Return author information from a post (defaults to display name)
Return formatted date from a post
Return the URI for the featured image of a post
Return the path to an attachment in the media library
Include a template part from the components folder, with optional arguments
Return the current theme directory
Return the current theme directory URI
Return the path to a theme asset file
Return .svg file parsed for inline use
Register a custom post type
Register a custom taxonomy
Used in layout components. Loop through the layout items and output components from their data, if a class and a class suffix is present wrap the component in a div.
Return an object with the full menu structure for a menu location