This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Fonts field – render Google font link in header ?

9 years ago · Last reply by Greg Priday 9 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

5
  1. micemade 9 years, 2 months ago

    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. micemade 9 years, 2 months ago

    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. micemade 9 years, 2 months ago

    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. micemade 9 years, 2 months ago

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

  5. Greg Priday Staff 9 years, 2 months ago

    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.

Have a different question or issue?

Start New Thread