• Resolved Ate Up With Motor

    (@ate-up-with-motor)


    I have an older theme called Frontier, which uses two Google Fonts (Arimo and Roboto). My child theme’s style sheet removes the references to those fonts, which as far as I can tell keeps them from loading on the front end. However, I just realized that the parent theme is still trying to call those fonts when I use the post editor on the administrative dashboard. The download is failing because my HTTP header setting doesn’t permit cross-origin content, but I’d like to stop it from even trying to load remote fonts.

    Can Disable and Remove Google Fonts do that? I’m kind of at a loss because the child theme is not (so far as I can see) even trying to load the fonts on the front end, but they’re still trying to load on the post editor. (If it matters, I’m using the Classic Editor.)

    Thanks!

    • This topic was modified 3 years, 1 month ago by Ate Up With Motor. Reason: Revised because the problem is different than initially thought

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author DannyCooper

    (@dannycooper)

    Hi @ate-up-with-motor,

    Please could you send me a zip of the theme file ([email protected]) and I will look into this.

    Thanks

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    I looked at the theme source code in more detail and I think I see what the issue is, but I’m not sure how to resolve it.

    The theme has an additional stylesheet (editor-style.css) for the Post Editor, to make it easier to see while editing how something will look on the front end. The very first line of that stylesheet is:

    @import url(//fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Arimo:400,700);

    The stylesheet then uses those fonts in several places.

    If I add a version of editor-style.css to my child theme, I can override the specific uses of those fonts, but I don’t know how to disable or remove the @import directive without hacking the parent theme files.

    The parent theme functions.php file is enqueuing those fonts, which my child theme functions.php then un-enqueues. This keeps the fonts from loading on the front end, but not in the Post Editor.

    I found there IS a theme option to disable the editor-style stylesheet, but that’s an all-or-nothing affair.

    It looks like the basic issue is that I don’t know how to override @import url(//fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Arimo:400,700); from the child theme beyond what I’ve already done. If you have any suggestions, they’d be much appreciated!

    Plugin Author DannyCooper

    (@dannycooper)

    Hi @ate-up-with-motor,

    I’m happy to take a look, but you will need to send me the theme files ??

    Thanks

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    I’ve done that now. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress administrative dashboard?’ is closed to new replies.