Home>Support>Fonts field – render Google font link in header ?

Fonts field – render Google font link in header ?

Hi,
we’re having validator error with style link added to body (insted to head) for Fonts field for embedding Google fonts.
Any chance that Google fonts can be loaded in header … perhaps via wp_add_inline_style method ?

Thanks

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 8 months ago micemade

    Same is valid for icon widget – the style link is added to body ( the id=”siteorigin-widget-icon-font-[typicons] …”) . Also doesn’t pass the validator …

  2. 7 years, 8 months ago micemade

    Sorry, please ignore previous posts. I found out what was wrong (I missed some) SO functions for Google font.

    However, the “Icon widget”, which uses siteorigin_widget_get_icon() method, still outputs () inside body tag.
    Can this be changed so it doesn’t load inside

    <body>

    tag ?

  3. 7 years, 8 months ago micemade

    Sorry again, the validator doesn’t allow style tag, not link tag:

    Error: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
    From line 2430, column 1; to line 2430, column 68
    ='all' />↩<style id='mm_sow-custom-css-zmPj2tmv3J-inline-css' type='text/css'>↩.mm_s
    Contexts in which element style may be used:
    Where metadata content is expected.
    In a noscript element that is a child of a head element.
    Content model for element body:
    Flow content.

    And style tag is SO panels:

    <style id="siteorigin-panels-front-inline-css" type="text/css"></style>
  4. 7 years, 8 months ago micemade

    PLEASE IGNORE THIS THREAD (it was very late in the night … :) )

  5. 7 years, 8 months ago Greg Priday
    Hi, I Work Here

    Glad to hear you got everything sorted micemade :)

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More