Home Forums Weaver Xtreme Theme Bypass use of Google Fonts in newest version

Topic Resolution: Not Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #72737
    MMWBAdmin
    Participant

    Hi,

    is there a (simple) way to bypass / disable the use of (local) google fonts through Xtreme alltogether?

    For that reason I checked the box “<small>Disable Google Font Integration</small>: “. Now it is noted: “Weaver Xtreme Self-hosts Google fonts now, and this option is not really useful any longer”

    My site http://www.mmwb.nl is build as a child theme and uses 2 google fonts (Open Sans and Oswald) that I embedded myself and are hosted local. Two variants are preloaded via .htaccess

    With the latest version of Xtreme these fonts load twice, e.g

    wp-content/themes/weaver-xtreme/assets/css/fonts/google/open-sans-italic-latin-ext.woff2

    Is there still a way to disable google fonts integration?

     

    #72739
    Weaver
    Keymaster

    There is no way to disable the now self-hosted google fonts using theme options.

    You say the fonts are loading twice? That must be once from your child theme, and once from the theme itself.

    Only the fonts used are actually loaded, although not via .htaccess.

    But all indications are that the method used by Weaver Xtreme to load fonts is faster than using the Google hosted version. I am skeptical that preloading via .htaccess would provide a measurable difference.

    Since the theme relies on the google .css file (one for theme, one for Weaver Xtreme Plus which also self-hosts with Version 6.2), I’m not sure the fonts will be recognized by the page/post editors if loaded differently. So perhaps the easiest thing to do would be to remove the self-hosting from your child.

    But since you have a child, if you do know a bit of PHP, you could override the theme’s loading of fonts.

    The fonts are loaded in response to the wp_enqueue_scripts action in the theme functions.php. Actions can be removed (https://developer.wordpress.org/reference/functions/remove_action/), so your child could remove the parents action and replace it with your own based on the font load action version in Weaver’s function.php. That action is unlikely to change much in future versions, although it did have major changes going from Weaver 5 to Weaver 6.2.

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