add this before wp-less plugin initialises
add_action('wp-less_compiler_construct_pre', function($compiler) {
$compiler->setFormatter('compressed');
});
https://github.com/Pravdomil/wp-pravdomil/blob/master/less.php
Hello,
can you explain me in which file we have to put this function ?
You can put it in the theme functions.php file.
Ok i found 🙂
It’s in the theme function.php :
function nt_less() {
add_action('wp-less_compiler_construct_pre', function($compiler) {
$compiler->setFormatter('compressed');
});
if ( ! is_admin() ) {
wp_enqueue_style( 'less-style', get_stylesheet_directory_uri() . '/style/styles.less' );
wp_enqueue_style( 'fontawesome-style', get_stylesheet_directory_uri() . '/style/font-awesome.less' );
}
}
sorry pravdomil…
I had not refreshed the page and I had not saw your answer 🙂