jigsaw
jigsaw copied to clipboard
Jigsaw::add_css allow for use with child themes
Because it's prepending the theme directory to the request URL, it doesn't allow child-theme to use this helper.
I hit this issue today as well. :+1:
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)