Return to Snippet

Revision: 60163
at October 24, 2012 13:00 by ecksteing


Updated Code
/** START - ADD LESS TO WORDPRESS - http://eckstein.id.au  **/
add_action( 'wp_head' , 'itsb_lesscss' );
function itsb_lesscss() {
?>
     <link rel="stylesheet/less" type="text/css" href="<?php echo bloginfo('url'); ?>/wp-content/mu-plugins/style.less">
    <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.3.0/less-1.3.0.min.js" type="text/javascript"></script>
<?php 
}
/** END - ADD LESS TO WORDPRESS  **/

Revision: 60162
at October 24, 2012 12:55 by ecksteing


Initial Code
/** START - ADD LESS CSS FILE  **/
add_action( 'wp_head' , 'itsb_lesscss' );
function itsb_lesscss() {
?>
     <link rel="stylesheet/less" type="text/css" href="<?php echo bloginfo('url'); ?>/wp-content/mu-plugins/style.less">
    <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.3.0/less-1.3.0.min.js" type="text/javascript"></script>
<?php // Download the less.js file from http://lesscss.org/
}
/** END - ADD LESS CSS FILE  **/

Initial URL
http://eckstein.id.au/12651/general-technology/instructions-less-css/

Initial Description
How to insert the less preprocessor script in WordPress Websites and Blogs

Initial Title
Using LESS in WordPress

Initial Tags
css, javascript, php, wordpress

Initial Language
PHP