[Resolved] adding self-hosted fonts

  • Author
    Posts
  • #15599

    drosselbarto
    Participant

    I want to use “Montserrat-Regular” as self-hoted font (instead of Google fonts) for header navigation on the insane Polestar theme.
    How do I establish adding self-hosted fonts so those become available in child theme > customizing > theme settings > typography?

    I have already uploaded the fonts (.eot, .svg, .ttf, .woff, .woff2) into wp-content > child theme’s folder – So I only need to make them available in above dropdown.

    Thanks
    Alex

    #15600

    Andrew Misplon
    Keymaster

    Hi Alex

    You’ll need to load your self-hosted font in the child stylesheet or a Custom CSS location. See the heading “How to Host Google Fonts on Your Own Server”, the styles example is in that section. https://webdesign.tutsplus.com/tutorials/how-to-self-host-google-fonts–cms-34775.

    Once you’ve loaded your fonts you can stop Polestar from loading Google Fonts by adding the following to your child theme functions file:

    function polestar_child_remove_google_fonts() {
    
    	wp_dequeue_style( 'polestar-fonts' );
    
    }
    add_action( 'wp_enqueue_scripts', 'polestar_child_remove_google_fonts', 11 );

    Give that a try and let me know how you get on.

    #15605

    drosselbarto
    Participant
    This reply has been marked as private.
    #15606

    Andrew Misplon
    Keymaster

    Hi Alex

    Sure, no problem. Please, consider purchasing Polestar Premium. You can then email [email protected] with WordPress login details and a FTP username and password, I’ll lend a hand from there.

    #15612

    drosselbarto
    Participant
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Scroll to top