Working with CSS, LESS and JavaScript

Beans Compiler API is used to compile multiple internal or external CSS, LESS and JavaScript files on a per page basis.

By default, Beans loads UIkit (more info along with the active themes style.less file.

Enqueueing your assets

There are two options when it comes to enqueueing your own assets.

If you simply need to add your own CSS or JavaScript, you may use the WordPress standard euqueue functions. Assets added using the standard WordPress method can still be combined into a single file though, preventing unnecessary HTTP requests. This is covered in our Compiling all assets into one file article.

Alternatively, you can use Beans Compiler API to enqueue LESS files. These will be merged into the main cache file and your LESS content will be automatically converted to CSS on-the-fly. You can learn more about this in our Compiling assets article.