We'll create fresh WordPress site with LESS Compiler installed. You have 20 minutes to test the plugin after that site we'll be deleted.
Write LESS, edit your variables and compile your stylesheet from your dashboard.
Register and enqueue your LESS sheets the same way you would do for your CSS.
`
wp_enqueue_style( ‘my-less-handle’, ‘http://example.com/css/mystyle.less’, $deps, $ver, $media );
`
Configure the plugin with the less_configuration
filter.
Configuration of the plugin is optional, but you should at least register your variables if you are using a CSS framework.
Set a LESS variable value
`
less_set( $variable, $value );
`
Get a LESS variable value
`
less_get( $variable );
`
You will most likely use these functions in your theme’s functions.php
.
The plugin uses the Less.php Compiler.