@phil This appears a bug in the way that Infinity generates the urls in dynamic.css for subsites. Essentially, it assumes that the theme root directory contains the ‘part’ element of the URL – which on subsites (when subsites are defined as subfolders not subdomains) is not true. I’ll explain here for future reference, so forgive the techy bits and skip to the end for a solution.
For example, on my test subfolder subsite, my theme root path is:
/path/to/httpdocs/wp-content/themes
but the ‘path’ that parse_url()
returns is:
/cbox/wp-content/themes
As you can see, the ‘/cbox’ bit is in the latter and not the former, so when dynamic.css is generated for the subsite, Infinity includes that many characters at the front of the font URL in ‘dynamic.css’:
src: url('pdocs/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot');
There is a simple fix, however. The ironically-named function fix_url_path()
will ignore URL references that are absolute URLs. So all you need to do is copy ‘fonts.css’ from the ‘cbox-theme/assets/fonts’ folder into your child theme’s ‘assets/fonts’ folder, then edit it so that it has the actual URL to the font in it. For example:
@font-face {
font-family: 'iconSweetsRegular';
src: url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot');
src: url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.eot?#iefix') format('embedded-opentype'),
url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.woff') format('woff'),
url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.ttf') format('truetype'),
url('http://your.domain.name/wp-content/themes/cbox-theme/assets/fonts/iconsweets-webfont.svg#iconSweetsRegular') format('svg');
font-weight: normal;
font-style: normal;
}
Voila!