No internet connection
  1. Home
  2. Support

Problems with child theme

By Cristiano Paris @rhpk2018-12-12 12:20:14.745Z

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
  1. Leon Stafford @leonstafford2018-12-12 15:06:26.130Z

    Hi Cristiano,

    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 ( ), 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.



    1. R
      In reply torhpk:
      Cristiano Paris @rhpk2018-12-12 16:09:04.519Z

      Hi, thanks a lot for the answer! Ok, I think I can live with it for the moment and wait for the next release. But if you want me to test it anyway, just let me know.