• hello, i’m only using one font on my music blog. but for some reason (plugins, previous themes), i’m loading 9 fonts at the moment:
    – libre baskerville
    – abril fatface
    – 3 times font awesome
    – etc

    I’m having a hard time finding the php code and handles to prevent all those fonts from loading. i was wondering if someone kind enough would help!

    PS: the only font i need to keep is Fredoka

    • This topic was modified 4 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The requests to gstatic.com are all variants of Fredoka AFAICT. Regular, bold, italic, bold italic, etc. Fontawesome and socicon are icon fonts. They tend to be more efficient than representing the same with images. There are not libre or abril fonts, nor multiple fontawesome. If you’ve resolved this on your own, that’s great! When you have a moment please mark this topic as resolved.

    Thread Starter na1man

    (@na1man)

    did you check the speedtest from yellow labs? font awesome is loaded 3 times instead of one. plus my previous theme’s fonts (Libre and Abril) are still loading according to this test.

    I can load only one font. Maybe 2 or 3 if I want to have social icons. but the test says there’s clearly a problem here.

    Moderator bcworkz

    (@bcworkz)

    There is only one fontawesome request according to the browser’s network developer tool.

    Regardless of what I see, resolve such issues by deactivating all plugins and switching to twentytwenty theme, which only loads one font, Inter var, from local WP files. Restore your theme and plugins, one at a time, noting what font gets added with each. When undesirable or duplicate fonts appear, the last activated module is the source. Then check that module’s CSS and JS files for code that is loading fonts.

    Depending on the situation, it could be difficult to cleanly prevent font loading from happening other than by directly editing the offending code. It’d be better if it can somehow be done by custom code independent of the theme or plugin by way of a filter or action hook.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘prevent fonts from loading’ is closed to new replies.