WordPress.org

Ready to get started?Download WordPress

Forums

#BW LESS-CSS
Ensure lesscss file included as last CSS file (2 posts)

  1. jlahm
    Member
    Posted 1 year ago #

    I would like to use a .less file to override any styling provided by the theme and even possibly other plugins. How do I include a .less file using this plugin and ensure it always is included last? Thanks!

    http://wordpress.org/extend/plugins/bw-less-css/

  2. Twansparant
    Member
    Posted 1 year ago #

    Hi jlahm,

    You can change this line:
    add_action( 'after_setup_theme', 'lesscss_include' );
    Into this line:
    add_action('wp_enqueue_scripts', 'lesscss_include');

    Or even place the bw_less_css() function within your excisting enqueue function and customize the order in there:

    function roots_scripts() {
      wp_enqueue_style('roots_bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', false, null);
      bw_less_css( 'assets/css/app.less', array( 'minify' => true ));
    }
    add_action('wp_enqueue_scripts', 'roots_scripts');

    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.