WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

#BW LESS-CSS

\#BW LESS-CSS is an easy to use interface for using LESS-CSS stylesheets in your theme.

  1. Upload bw-less-css folder to your /wp-content/plugins/ directory
  2. Activate the plugin in WordPress admin
  3. Attach .less files to your template using the plugin admin page, under #BW Options -> LESS-CSS
    3a. Specify files relative to your theme root (eg. style.less for a file in the root)
    3b. If using a specialty stylesheets (eg. for print), select the media type
    3c. To target mobile devices, check the mobile checkbox (see FAQ below) 3d. To minify (compress) the compiled CSS, check the minify checkbox

Manually include .less files:

To hard-code a .less file into a template, use <?php bw_less_css( $file, $args = array() ) ?> in a template file, called by after_setup_theme action.

<?php 

add_action( 'after_setup_theme', 'lesscss_include' );
function lesscss_include() {
    bw_less_css( 'style.css' );
    bw_less_css( 'css/print.css', array( 'media' => 'print', 'minify' => true, 'mobile' => false, 'force' => false );
}

?>

Files are relative to the theme root, and the less compiler will save the .css to the same path as the .less file.

If you are using @import to compile multiple stylesheets into a single file, such as Twitter's Bootstrap, turn on developer mode while developing to force the stylesheets to recompile every time the page is loaded. If developer mode is off, imported stylesheets will not be recompiled unless you re-save the main stylesheet. If manually including less files using bw_less_css(), set 'force' => true argument.

Requires: 3.0 or higher
Compatible up to: 3.2.1
Last Updated: 2012-2-10
Downloads: 3,041

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,2,2
100,1,1 100,1,1
100,1,1
0,2,0
100,2,2