[Support request] Adding function to replace font with another

Home Forums Support Adding function to replace font with another

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1302402
    marc

    Hi,

    I just went for the premium version of GP.
    My site was previously on a thrive custom theme.

    I’d like to setup a quick php function to replace the font “roboto” by “inherit” on all pages. Any idea how I could do that? Do you think this could make my site/page load faster?

    Also, is it better not to use google fonts for site speed/pagescore? As I’m still using this page builder I’m not sure it can be done?

    The page I gave you is the final look I want all my pages to have.

    Thanks in advance,
    Marc

    #1302719
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    How is the “Roboto” font set? I took a quick look and couldn’t find it on your site.

    Loading your fonts locally is definitely better for performance, as you’re not relying on an external HTTP request to load your page: https://docs.generatepress.com/article/adding-local-fonts/

    #1303100
    marc

    Hi Tom,

    Thanks for your answer.

    The font is set by the thrive plugin. If you go on the home page for example you will see the site has a complete different look (for now). The page I gave you represent the look of “my new site” which I’m going to apply to every pages.

    However, since I will still be using thrive architect as a content builder, I’m just wondering if it possible to only load 2 fonts or if it’s going to break the plugin?

    Thanks

    Marc

    #1303790
    Tom
    Lead Developer
    Lead Developer

    If you’ve set a font inside the page builder and no longer want to use/load it, you will likely need to go in and manually un-set it. However, that’s something you can ask Thrive – they may have a better way to do it 🙂

    #1322515
    marc

    Thanks Tom.

    I’m not loading google fonts anymore but my site still has quite an average/low score on mobile.
    I followed your guide on optimizing GP https://generatepress.com/fastest-wordpress-theme/

    but I still have to deal with the following recommendation “Eliminate render-blocking resources” and of course removing unused CSS. I also already tried the following but it made things worst:
    1. Combine and load fonts asynchronously with webfont.js
    2. Async Javascript-files or use the Async Javascript plugin.

    Anything else you would recommend?

    Thanks in advance
    Marc

    #1322773
    Tom
    Lead Developer
    Lead Developer

    Blocking resources are a necessary thing in most cases, unless you want your entire site to appear un-styled until the CSS is loaded in the footer.

    You could try using a critical CSS plugin to move only critical CSS to the header.

    Other than that, I would just try to reduce as much CSS/JS on the site as possible.

    #1323532
    marc

    Thanks for your help Tom.

    I know this is unrelated but any idea when we will be able to only remove creative work schema?

    Thanks,
    Marc

    #1323946
    Tom
    Lead Developer
    Lead Developer

    In GP? You can right now:

    add_filter( 'generate_schema_type', '__return_false' );

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