A opinionated Wordpress base theme based on Sage.
This project is being constantly modified (I promise to fix the commit mess someday).
crius.json
and@Components/...pathToComponent
import Header from '@Components/Header/Header.js'
import SubHeader from '@Components/Header/SubHeder/SubHeader.js'
@Scripts/...
.styl
file is imported automatically by theindex.styl
.views
directory.
@include('Components.Header.Header')
gulp component --create component1,component2,component3,...
gulp component --delete component1,component2,component3,...
You can use controllers to pass data to specific templates. A controller must be
created inside the
./app/controllers/
directory.
@mainquery ... @endmainquery
- Loops through the main query;@customquery(\WP_Query $queryObj) ... @endcustomquery
- Loops through a@visitor ... @endvisitor
- Shows a certain content only to site visitors@loggedin ... @endloggedin
- Shows a certain content only logged users;@shortcode
- Executes a certain shortcode;@inlinesvg
- Prints the specified SVG file;@dump
- Dumps an php variable with a var_export
;@console
- Dumps a php variable in the javascript console;Directives can be defined on
config/directives.php
.
Front-end
body_class()
output;<head>
;defer
;.com/?s=term
with .com/search/term
;oembed
inside the_content()
around a <div class="oembed-container">
;http
,https
) from urls;editor.styl
selene
Back-end
WP_DEBUG
is true or WP_ENV
is equal to 'development', the enqueuedSelene comes out of the box with ACF Builder which makes a piece-of-cake to programmatically create custom fields with ACF.
Create your field group
inside the root of
app/fields
and
return one (the field group
itself) or more (an array of field groups
).
If ACF is not installed, the files will be ignored.
Pretty much every task needed is covered by the package.json
scripts:
npm run watch|start
- Run browsersync and watch file changes;npm run build
- Build minified assets;npm run build:dev
- Build unminified assets;npm run build:production
- Build the assets, append a hash to the name;npm run clean
- Remove the dist
folder;npm run lint
- Lint all styl
and js
files;npm run lint:styles
- Lint all styl
files;npm run lint:scripts
- Lint all js
files.gulp purify
- Reads .blade.php
and .js
files and removes unused css