Title: Implementation with Roots Theme?
Last modified: August 21, 2016

---

# Implementation with Roots Theme?

 *  [Twansparant](https://wordpress.org/support/users/twansparant/)
 * (@twansparant)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/implementation-with-roots-theme/)
 * Hi there,
 * I’m trying really hard to implement this plugin within my theme build with the
   [Roots theme](http://www.rootstheme.com/), but I can’t find any (proper) documentation
   about it anywhere…
 * 1) So I activated the plugin and in the theme file **lib/scripts.php** I replaced
   this line:
    `wp_enqueue_style('roots_app', get_template_directory_uri() . '/assets/
   css/app.css', false, null);` with this line: `wp_enqueue_style('roots_app', get_template_directory_uri().'/
   assets/less/app.less', false, null);` but that doesn’t work at all, the whole
   site even breaks!
 * I discovered it’s because of the Roots rewrite rules. When I disable the ‘template_directory_uri’
   rewrites in the **lib/rewrites.php** file it does work!
 * So I changed the line into:
    `wp_enqueue_style('roots_app_less', get_bloginfo('
   url') .'/wp-content/themes/mytheme/assets/less/app-less.less');`
 * But it’s not very pretty, is there a workaround for this?
 * 2) Another issue; the compiled .css file ends up in this folder in the root:
   **
   media/wp-less/mytheme/assets/less/** while I rather would like it compiled directly
   into the **wp-content/themes/mytheme/assets/css** folder.
 * So I added this into my **scripts.php** file:
 *     ```
       if (class_exists('WPLessPlugin')){
       	$lessConfig = WPLessPlugin::getInstance()->getConfiguration();
       	// compiles in the active theme, in a ‘compiled-css’ subfolder
       	$lessConfig->setUploadDir(get_stylesheet_directory() . '/assets/css');
       	$lessConfig->setUploadUrl(get_stylesheet_directory_uri() . '/assets/css');
       }
       ```
   
 * But then the file doesn’t get compiled, probably because of the writing permissions…
   
   Any fixes for that?
 * Thanks!
 * [http://wordpress.org/extend/plugins/wp-less/](http://wordpress.org/extend/plugins/wp-less/)

The topic ‘Implementation with Roots Theme?’ 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/)

## Tags

 * [compile](https://wordpress.org/support/topic-tag/compile/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [roots](https://wordpress.org/support/topic-tag/roots/)

 * 0 replies
 * 1 participant
 * Last reply from: [Twansparant](https://wordpress.org/support/users/twansparant/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/implementation-with-roots-theme/)
 * Status: not resolved