schwipps
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: A Child Theme as a means to use LESS.js?Here are the steps I followed :
1. Create a .less file where you’ll put your varaiables, mixins, nested rules, functions and operations.
2. import .less file to your CSS stylesheet at the top of the file with
@import "filename.less"
3. Replace WordPress stylesheet declaration in header.php :
instead of
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
, insert
<link rel="stylesheet/less" type="text/css" media="all" href="<?php bloginfo('template_directory') ?>/filename.less"/>
4. Below that declaration, load the .js script : `<script src=”https://lesscss.googlecode.com/files/less-1.1.0.min.js”></script>
`Finally, if your files are clean, it should work.
Hope that helps
Forum: Fixing WordPress
In reply to: A Child Theme as a means to use LESS.js?Thanks lunelson.
I finally got it working with the client side usage, but LESS.app helped me to understand why it didn’t work before : there was a tiny mistake in my .less file, preventing it to be processed :/
WP-LESS is useful because it relies on the php compiler, which is better than the js one. It’s server side and thus provides a potentially faster process, especially with old browsers. However, I still couldn’t make it work…
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=""
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 ?
Thanks
Forum: Themes and Templates
In reply to: Sidebar disappearing when reading articles, but only if unloggedI solved this, but I don’t really know how…
All I can say is that it seems to have somehow to deal with the order of the js scripts declarations in my header.
wp_head(); ?>
MUST BE the very last thing to stand before</head>...
Forum: Fixing WordPress
In reply to: A Child Theme as a means to use LESS.js?Any takers? Please help!
HI Lunelson !
I’m in the exact same approach you’ve described above : I’d like to use LESS but can”t figure out how to get it work, although it shouldn’t be rocket science…
I tried to be straighforward, following the client side usage (of course, I adapted the paths and filenames). All I achieved was to load the .js compiler, then nothing happens : my mixins doesn’t seem to get compiled.
I also explored the WP-LESS plugin, with no more success, though I don’t really see the point about making a plugin for this.
Only one question then : could you make it work ?
Forum: Themes and Templates
In reply to: Sidebar disappearing when reading articles, but only if unloggedI’ve just read that this behaviour would be normal. However, it’s not the case on my sandbox WordPress.
Can somebody confirm ? And if it’s right, how could I change this behaviour ?
Forum: Themes and Templates
In reply to: Menu and CSS3 transitionsUp !