Posted By

ecksteing on 10/24/12


Tagged

css javascript php wordpress SASS less


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hikomen


Using LESS in WordPress


 / Published in: PHP
 

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

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

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

Report this snippet  

You need to login to post a comment.