Using LESS in WordPress


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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 **/

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.