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

    Hi

    Let me start by saying that I’ve been using the Enfold theme for 6-7 years now and produced multiple websites for various clients with Enfold, and I absolutely love the theme.

    Normally, if I have any “problems” I can usually Google it as others before me have encountered the same issues before, but this time I’m stuck.
    Hopefully the great support team at Enfold can help me. 😊

    Here’s the thing.

    I’ve defined Montserrat as the primary heading font in both “General Styling” under “Fonts” and in “Advanced Styling”.
    I’ve also downloaded and installed Montserrat under the “Import/Export” option under “Custom Font Manager”.

    Despite all this, the preview of my page will not show the correct font weight for the headings.

    I’ve never experienced this bebefore.

    • This topic was modified 2 years, 6 months ago by Scanmark.
    #1351097

    Hey Scanmark,

    Thank you for the inquiry.

    The theme only supports the default variation or weight of the Monserrat font but it can be adjusted with a filter. To include the other font weights, try to use this code in the functions.php file.

    add_filter( 'avf_google_heading_font', 'avia_add_custom_heading_font');
    add_filter( 'avf_google_content_font', 'avia_add_custom_body_font');
    function avia_add_custom_heading_font($fonts)
    {
        $fonts['Montserrat New'] = 'Montserrat:300,600,800,900';
        return $fonts;
    }
    
    function avia_add_custom_body_font($fonts)
    {
        $fonts['Google fonts']['Montserrat New'] = 'Montserrat:300,600,800,900';
        return $fonts;
    }
    

    Make sure to select Montserrat New in the fonts settings.

    Related thread: https://kriesi.at/support/topic/google-fonts-11/#post-1025744

    Best regards,
    Ismael

    #1351375

    Hi Ismael

    Thanks a lot for your reply. :-)

    However, even though I’ve designed a lot of web pages with Enfold, I’ve never done any modifications in the functions.php.file, so I’m not 100% sure on how to proceed with this, but I gave it a try.

    I’ve added the code you sent me into “Theme functions (functions.php).
    I then tried to select Montserrat New from “General Styling” and “Fonts”, but Montserrat New was nowhere to be found there.
    I also had look at Advanced Settings to see if the font was present there, but it wasn’t.
    I then tried to download the Montserrat font from the Custom Font Manager. That didn’t help either.

    I’m not sure what to do from here. Could you please advise me further? I’ve sent the necessary login credentials earlier if you need to log into the page to have a look (and clean up my mess).

    #1351485

    Hi,

    Thank you for the update.

    After adding the filter, you should find the font at the very bottom of the dropdown. Did you check it there?

    UPDATE: We moved the filter around line 57 of the functions.php file. You can find the new font as the very last option, after Yellowtail. You may need to install and activate a child theme in order to preserve this modification.

    // https://kriesi.at/documentation/enfold/child-theme/

    Best regards,
    Ismael

    #1351493

    Hi Ismael

    Thanks a lot for your assistance! Now everything looks great.

    Best regards
    Roland

    #1351502

    Hi,

    Great, I’m glad that Ismael could help you out. Note that this modification will be overwritten on updates, please move it into a child theme if you would like to keep it.

    Best regards,
    Rikard

    #1351549

    Hi Rikard

    I will set up a child theme to preserve the modifications. Thanks for great support.

    Best regards,
    Roland

    #1351560

    Hi,

    Great, I’m glad that we could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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