Register Assets

To add Javascripts and Styles, use this file ./core/config/assets.php. It is recommended to manage your dependencies through Gulp and not by the WordPress functions wp_enqueue_


Add CSS

The styles Array loads in the added order and receives 2 (two) parameters:

ParamTypeDescriptionRequired
$cssstringCSS path or URL
$homeboolAppear only on Home
/*
|--------------------------------------------------------------------------
| LOAD CSS
|--------------------------------------------------------------------------
*/
'css' => [
[ 'assets/css/main.css' ],
[ 'assets/css/home.css', true ],
[ 'assets/css/myCustomStyle.css'],
[ 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css' ],
],

Add Javascript

The scripts Array loads in the added order and receives 2 (two) parameters:

ParamTypeDescriptionRequired
$jsstringJavascript path or URL
$homeboolAppear only on Home
/*
|--------------------------------------------------------------------------
| LOAD JAVASCRIPTS
|--------------------------------------------------------------------------
*/
'js' => [
[ 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js' ],
[ 'assets/js/app.min.js' ],
[ 'assets/js/home.min.js', true ],
[ 'assets/js/myCustomScript.js'],
],