Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1347552

    Hello folks,

    I was trying to make use of uploading a custom font and serve this font from the web server for better GDPR compliance.
    However, it seems the links being generated do not respect the WPML setting to use subdomains for alternate languages.
    This means the website will load the font files from a different domain which is blocked by a CORS policy (as it should).

    Screenshot: https://take.ms/lhHsN

    Can this please be corrected in the next public release so the correct fonts URL is used for alternate languages?

    Thanks,
    —Julian

    #1347691

    Hey jpa6,

    Thank you for the inquiry.

    This is probably the same issue as discussed in this older thread.

    // https://kriesi.at/support/topic/cross-origin-request-blocked-fonts-not-loading-on-english-wpml/

    You have to add this code in the functions.php file to adjust the path and use relative URL for the font files.

    add_theme_support( 'custom_uploaded_fonts_relative_url' );
    

    Please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the snippet.

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.