Title: [Plugin: WP-LESS] WP 3.4
Last modified: August 20, 2016

---

# [Plugin: WP-LESS] WP 3.4

 *  Resolved [wpcrank_phil](https://wordpress.org/support/users/wpcsphil/)
 * (@wpcsphil)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/)
 * Hello all,
 * Have a client whose previous developer was using wp-less. She just upgraded on
   her own to 3.4 and the plugin didn’t care for that. I didn’t built the site (
   complicated) and not sure that there was no core changes and or such and hoping
   to not have to try rolling it back.
 * Anyone have any idea how to get it working again? Seems maybe it would work if
   I could just trick the plugin into thinking it’s 3.3, but couldn’t figure it 
   out.
 * Any ideas???
 * Thanks!
 * Philip
 * [http://wordpress.org/extend/plugins/wp-less/](http://wordpress.org/extend/plugins/wp-less/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [dotmagic](https://wordpress.org/support/users/dotmagic/)
 * (@dotmagic)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951779)
 * I have no idea why so many say its broken with 3.4.x.
    I’m using it with WP 3.4.1
   and it works fine. Anyway, you can disable the plugin and compile the .less file
   to .css, then change the line in funcions.php to include it in your theme, thats
   all.
 * I use Simpless for compile the less file. Once you know about less you won’t 
   miss it anymore 😉
 *  [idosius](https://wordpress.org/support/users/idosius/)
 * (@idosius)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951789)
 * It doesn’t work for me either on WordPress 3.4.2, running on Windows XAMPP. I’m
   developing a theme with the WordPress Roots theme. I created an app.less file
   and tried to write some code in it, but the output isn’t compiled to CSS.
 * Is there any debug info that could help?
 *  [idosius](https://wordpress.org/support/users/idosius/)
 * (@idosius)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951790)
 * I investigated further and noticed several issues:
    1. Roots theme uses the wp_enqueue_scripts action. It says [here](http://wordpress.org/support/topic/my-wp_enqueue_style-is-not-recognized-by-wp-less?replies=2)
       to use the wp action. Why is that so? Why doesn’t it work with the wp_enqueue_scripts
       hook?
    2. In the Roots theme there are some htaccess tricks to put all the stylesheets
       into /assets/css. It seems the WP-LESS plugin needs the full wp-content path
       to the file. Is this a bug? Any workarounds?
 *  [idosius](https://wordpress.org/support/users/idosius/)
 * (@idosius)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951791)
 * Update – got it to work with the following code:
 *     ```
       function roots_enqueue_less() {
         wp_enqueue_style('roots_app', '/themes/mytheme/assets/css/app.less', array(), '', 'screen, projection');
       }
   
       add_action('wp', 'roots_enqueue_less');
       ```
   
    1. Full path following wp-content
    2. Using wp as the action
 * In my opinion it should also work with wp_enqueue_scripts action and with the/
   assets trick.
 *  Plugin Author [thom4](https://wordpress.org/support/users/oncletom/)
 * (@oncletom)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951792)
 * Do you still encounter the problem?
 * I don’t see any change with WP 3.4.x.
 * Can you all copy/paste how you enqueue your CSS?
 * Thanks 🙂
 *  [idosius](https://wordpress.org/support/users/idosius/)
 * (@idosius)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951794)
 * As I wrote above – the enqueued LESS file only works when it’s added to the ‘
   wp’ hook. When it’s added to ‘wp_enqueue_scripts’ it doesn’t work. At least not
   with the Roots theme:
    [http://www.rootstheme.com/](http://www.rootstheme.com/)
 *  Plugin Author [thom4](https://wordpress.org/support/users/oncletom/)
 * (@oncletom)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951796)
 * `wp_enqueue_scripts` is far too late for a hook to make this working at the moment.
 * I’ve described the [Processing Workflow](https://github.com/oncletom/wp-less/wiki/API#Processing%20Workflow)
   on the project wiki.
 * I guess I could delay the LESS processing to the `wp_print_styles` action, in
   a low priority.
 *  [idosius](https://wordpress.org/support/users/idosius/)
 * (@idosius)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951797)
 * Sorry, I meant wp_enqueue_style. Might want to change the instructions here: 
   [http://wordpress.org/extend/plugins/wp-less/faq/](http://wordpress.org/extend/plugins/wp-less/faq/)
 *  Plugin Author [thom4](https://wordpress.org/support/users/oncletom/)
 * (@oncletom)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951799)
 * I’ve digged in the code: they enqueue CSS files on `wp_enqueue_scripts`, which
   is AFTER `wp` action and before `wp_print_styles`.
 * They recommend to compile files as yourtheme/style.css.
    Anyway, their way of
   registering CSS is not very handy, especially as it forces the browser to load
   4 CSS files… which is counterproductive for performances.
 * What I would do
 *     ```
       add_action('wp_enqueue_scripts', 'customize_roots_css', 200);
       add_action('init', 'my_less_styles');
   
       function customize_roots_css(){
         wp_dequeue_style('roots_bootstrap');
         wp_dequeue_style('roots_bootstrap_responsive');
         wp_dequeue_style('roots_app');
         wp_dequeue_style('roots_child');
       }
   
       function my_less_styles(){
         wp_enqueue_style('theme_main', get_stylesheet_directory_uri() . '/style.less');
       }
       ```
   
 * Use `@import` to load bootstrap, responsive and roots CSS (if needed) to compile
   that in 1 working file.
 *  Plugin Author [thom4](https://wordpress.org/support/users/oncletom/)
 * (@oncletom)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951805)
 * Problem finally addressed by a contribution — [https://github.com/oncletom/wp-less/pull/18](https://github.com/oncletom/wp-less/pull/18)
 * Lands in 1.5.0.
 *  [Paul](https://wordpress.org/support/users/paulrudy/)
 * (@paulrudy)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951810)
 * THANK YOU. This works in roots theme now.
 *  Plugin Author [thom4](https://wordpress.org/support/users/oncletom/)
 * (@oncletom)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951811)
 * Cool, nice to hear that 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘[Plugin: WP-LESS] WP 3.4’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-less.svg)
 * [WP-LESS](https://wordpress.org/plugins/wp-less/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-less/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-less/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-less/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-less/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-less/reviews/)

 * 12 replies
 * 5 participants
 * Last reply from: [thom4](https://wordpress.org/support/users/oncletom/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-less-wp-34/#post-2951811)
 * Status: resolved