BETTER TIP: for those with problems get the plugin to work (5 posts)

  1. anjoalre
    Posted 5 years ago #

    After spending some time trying to get the plugin to work i foud out that 'less.js' existed! So simply add this into header.php:

    <link rel="stylesheet/less" href="your-file.less" type="text/css" />
    <script src="http://lesscss.googlecode.com/files/less-1.0.21.min.js"></script>


  2. oncletom
    Plugin Author

    Posted 5 years ago #

    I could eventually include the JS solution. However it's less performant on the client side.

  3. schwipps
    Posted 5 years ago #

    Hi !

    I can't manage to get {LESS}'s .js compiler working with WordPress, even with the basic client-side method.

    After researches, I figured that WordPress needs a rel="stylesheet"
    Therefore, I just can't use the <link rel="stylesheet/less" [...]> as explained on the website.

    I also had a doubt about the fact that I had to separate my css code and less commands respectively in .css and .less file. Can you confim it doesn't work this way ?

    What am I missing ?


  4. schwipps
    Posted 5 years ago #

    Solved ! I just had a misplaced dot preventing the whole .js to work. Once deleted, the client side method works like a charm.
    My mistake was revealed by OSX less.app which, in such cases, returns an alert.

    However, I'm still unable to get the WP-Less plugin working...

    Following the installation notes, here is what I declare in my header :

    <link 	rel="stylesheet" type="text/css" media="all"
    		href="<?php wp_enqueue_style('template_name', get_bloginfo('template_directory').'/style.less', array('blueprint'), '', 'screen, projection'); ?>

    When I take a look to the generated source, I get href=""

  5. CodeMonkey613
    Posted 4 years ago #

    schwipps, that's not how you use wp_enqueue_style. It doesn't output the URL, it outputs the enter <link> tag. Don't forget to add wp_head() in your theme's <head></head> section.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic