Google Font works in customize, but not in live

This topic has 6 replies, 2 voices, and was last updated 4 years, 6 months ago ago by Rose Tyler

  • Avatar: wolfatadfilm
    wolfatadfilm
    Participant
    October 12, 2019 at 15:51

    A google font set as the main content and headline font works in customizer, but doesn’t in live after publishing. The reason very simply is that “link href fonts.gstatic.com” is included in both versions, but the
    “link rel=”stylesheet” href=”https://fonts.googleapis.com/css?family=…”
    is not.
    I’ve solved this for now by adding that line to my head manually, but this is of course not optimal.
    There is also (maybe connected) a cross-domain referencing error for another font that is stored locally, because it is embedded from the main domain, not the staging subdomain in question.

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 12, 2019 at 16:03

    Hello,

    I suppose it’s because of the Access-Control-Allow-Origin (CORS origin) Issue – https://prnt.sc/picrlh Read this post to fix it http://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/
    The problem is not related to our theme.

    Regards

    Avatar: wolfatadfilm
    wolfatadfilm
    Participant
    October 12, 2019 at 16:34

    This for sure is true for the .woff file that is a custom font loaded locally, but how is a missing fonts.googleapi.com stylesheet related to CORS?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 12, 2019 at 16:44

    Hello,

    Could you, please provide temporary wp-admin access?
    I will pass this question to one of our developers.

    Regards

    Avatar: wolfatadfilm
    wolfatadfilm
    Participant
    October 13, 2019 at 12:04

    Thanks for your offer. There were a few other things I was struggling with, so I decided to move to the main site from the staging site, and magically the problem disappeared.
    So something with that subdomain after all….

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 13, 2019 at 12:08

    Hello,

    I am glad that the problem was solved. Thanks for letting us know.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Google Font works in customize, but not in live’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.