Google WebFontConfig – missing css files

Posted in: Newspaper
Post count: 28

Hello,

I am having an issue with this code, which seems to be placed in the header section of every page:

WebFontConfig = {
google: { families: [‘FontOne’, ‘FontTwo’] },
fontinactive: function (fontFamily, fontDescription) {
//Something went wrong! Let’s load our local fonts.
WebFontConfig = {
custom: { families: [‘FontOne’, ‘FontTwo’],
urls: [‘font-one.css’, ‘font-two.css’]
}
};
loadFonts();
}
};

There is a lot of 404 errors because of these non-existing font css files. As a workaround I have placed two css files in the root directory, which stopped the errors “https://domain.com/font-one.css”. Still the problem continues with “https://domain.com/post-name/font-one.css”…

So, can you tell me in which directory exactly to place the css files called from the header in posts?

Alternatively, can you tell which file to open in order to remove this code from the header. (I looked at header.php, functions.php, but it’s not there.)

Website: https://zaistinata.com/

Google fonts are disabled in the theme panel. Custom Google font is used with url (https://fonts.googleapis.com/css2?family=Sofia+Sans+Semi+Condensed&display=swap).

….

Thank you!

Post count: 28

Post count: 21065

Hello @sashos!

Please check the solutions presented in this thread: https://wordpress.org/support/topic/minifying-css-prevents-google-fonts-from-loading/

I hope that helps you!

Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.