jigsaw icon indicating copy to clipboard operation
jigsaw copied to clipboard

Jigsaw::add_css allow for use with child themes

Open lmartins opened this issue 10 years ago • 2 comments

Because it's prepending the theme directory to the request URL, it doesn't allow child-theme to use this helper.

lmartins avatar Jan 13 '15 19:01 lmartins

I hit this issue today as well. :+1:

sidonaldson avatar Oct 21 '15 09:10 sidonaldson

For anyone wanting a quick fix for this in the mean time:

add_action( 'admin_enqueue_scripts', function() {
      $file = get_template_directory_uri() . "/child/overrides.css";
      wp_enqueue_style('app-theme-customisations', str_replace('base-theme','child-theme',$file));
    } );

where 'base-theme' and 'child-theme' are the difference in url path to the file (as get_template_directory_uri() only returns the base theme)

sidonaldson avatar Oct 21 '15 09:10 sidonaldson