Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions vague for newbies. #61

Open
travisjtodd opened this issue Dec 19, 2013 · 7 comments
Open

Installation instructions vague for newbies. #61

travisjtodd opened this issue Dec 19, 2013 · 7 comments

Comments

@travisjtodd
Copy link

I'm new to Wordpress development and don't understand where to install the plugin to have it required in my theme. You say to clone the git repo, but in what directory? Also, I'm unfamiliar with whatever Composer is.

As this is the first time I've touched such things it would be great if you could expand the installation section a bit more so that it doesn't imply that the developer has prior knowledge about the framework.

Thanks.

@roborourke
Copy link
Owner

@travisjtodd Hi Travis, do you use mac or windows?

To install composer head here and follow the instructions: http://getcomposer.org/

To download the plugin you can either get the zip file from github and then once you have extracted it browse to the folder on the command line and run:

composer install

Then you'll have a complete copy of the plugin and you can paste it into your theme's folder structure.

To embed the script in your theme you just have to place in it within your theme somewhere and include it via your functions.php.

A typical example would be to have an includes folder in your theme for external libraries or addons that your theme uses. Then in functions.php:

// load wp-less plugin
include( 'includes/wp-less/wp-less.php' );

Let me know if you need further help.

@lkraav
Copy link

lkraav commented Dec 19, 2013

A nice contribution would be if the receiving side here would make a pull request out of this help session and improve the documentation README in a way he deems understandable for a completely new person, such as he describes himself. I think the oldtimers, besides being generally busy too, may have difficulty imagining what a newcomer may or may not know or understand. Long story short: if you write it, we (that means sancho :) will merge it.

@roborourke
Copy link
Owner

@lkraav that would be the ideal, once I've helped you get up and running @travisjtodd could you make some notes here about what information you felt was missing and we'll put together an update for the README

@JulianKingman
Copy link

Your plugin looks really great, but I also am having a difficult time installing the plugin from the instructions. To give you an idea of where I (and possibly other newbies) am at:

  • I don't know what the command line is (do you mean SSH? I don't have access to that ATM)
  • I don't know what composer is or how to deal with dependencies
  • I don't use git, do I need to in order to install the plugin? unclear
  • I don't know where the vendor/leafo/lessphp directory is
  • I don't know how to enter the JSON info correctly

What I would love to see is:
step 1 - install plugin via zip file
step 2 - copy this code into functions.php
step 3 - there is no step 3, it works!

this would be OK:
step 1 - install plugin via zip
step 2 - download these files and upload them to this folder in Wordpress
step 3 - copy this code into functions.php

For what it's worth, I'm getting a white screen of death.

Thanks for your work, I can see this being a really valuable addition to my arsenal when I can figure out how to work it.

@harrymt
Copy link

harrymt commented Sep 5, 2017

@JulianKingman I added some more instructions here

https://gist.github.com/harrymt/ea76e7620b301d00b03ae838743a12e6

Enable auto LESS compling for Wordpress sites

  1. Download zip and extract two files, lessc.inc.php and wp-less.php then place entire contents in '/theme-name/inc/' https://github.com/roborourke/wp-less/releases
  2. Structure should be /theme-name/inc/wp-less.php
  3. Create a new function inside of functions.php called function add_less_processing() {
// functions.php
function add_less_processing() {

	// Enqueue the main .less style sheet
	if ( ! is_admin() )
	    wp_enqueue_style( 'style', get_template_directory_uri() . '/inc/assets/less/style.less' );
      
}

// use the WP action to hook these into our page build
add_action( 'wp_enqueue_scripts', 'add_less_processing' );
  1. A bit further down, add the following lines
/**
 * Add LESS support
 */
require get_template_directory() . '/inc/wp-less.php';

@roborourke
Copy link
Owner

roborourke commented Sep 7, 2017

@harrymt where does the wp_bootstrap_starter_scripts() function come from? Thanks for outlining the steps that'll help too

@harrymt
Copy link

harrymt commented Sep 7, 2017

@roborourke sorry I copied the function from my functions.php, it came with a bootstrapped wordpress theme. I have updated my comment above to show a better example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants