Problems with child theme
Hi, thanks a lot for the good work!
I'm having issues with a blog for which I developed a custom child theme starting from Twentyseventeen default Wordpress parent theme.
Basically, the files for the child theme (CSS and JS) are saved in a subfolder like "ui/twentyseventeen-custom" but are referenced in the exported html files like "ui/theme-custom".
I tried to have a look at the code and it seems that it has to do with the get_template_directory_uri() (to get URI for assets in the parent theme) and get_stylesheet_directory_uri() (to get URI for assets in the child theme) as used in the custom functions.php. Specifically, the latter seems to be incorrectly expanded.
A simple work-around is to rename manually the child theme directory to match the URI in the exported HTML files but that is sub-obtimal.
Can you help me?
- 2 replies
- Leon Stafford @leonstafford2018-12-12 15:06:26.130Z
Ah, I think you've discovered a naive implementation of the rewriting I first implemented.
I'm not sure if it's any better in the latest pre-release version ( https://forum.wp2static.com/-30/how-to-install-the-latest-preview-of-version-59-of-wp2static ), but I'll get it fixed before release, as it's a major bug for anyone with similarily named parent/child themes.
If you can try out the latest release and let me know if that solves it, that'd be great.
Another workaround is to disable the path rewriting, which you can do in 5.9.