Child Theme Compatibility
-
First of all, again, great plugin! I love it and use it on several sites, one day I will make a donation.
So I looked at this before and finally spent some time to fix the problem. The issue is caused because the plugin is using the theme’s “template” attribute to determine the theme’s slug or folder name. This attribute actually stores the parent theme’s folder name, and it’s not documented but it looks like it returns the theme’s folder name when there is no parent and that’s the only reason it works for non-child themes.
The correct attribute to use would be the “stylesheet” attribute – it is not in the documentation but it is works. Alternatively, there is a method in the documentation that does the same thing: get_stylesheet(). I believe there are 10 spots to make this change.
To fix the problem, replace every occurrence of
$theme->template
with$theme->stylesheet
or$theme->get_stylesheet()
in the sc-theme-editor.php file.This works for me and now I can edit child themes with your plugin!
Also, it would be nice to update the other topic, “cannot edit child theme files”, to either post how to fix it or link to this topic, or if the plugin is updated with this fixed.
- The topic ‘Child Theme Compatibility’ is closed to new replies.