Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #327575

    I have a Google font (Amarante) that I want to use as a font on my site. I have been working on this all day and finally just decided to ask for help. LOL

    Here is where I started: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/

    As instructed, I tried adding that block of code to the end of functions.php.
    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Amarante’] = ‘Amarante’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Amarante’] = ‘Amarante’;
    return $fonts;
    }

    But, it didn’t have Amarante in the list of available fonts. So… some specific questions.

    I found a bunch of similar threads on the support forum with variations of the code listed above, but after trying all of them, none of them showed the font in the font list in the advanced styling editor. Is what I am trying to do possible? I want it added to the list of available fonts via the editor, not just available via CSS.
    Do I need to create a child theme for this to work? If I edit the main theme’s functions.php, will it be erased by future theme updates?

    Feel free to talk to me like a child. I am not an expert in CSS nor web design, which is one of the reasons I went with this theme. :)

    #327597

    Hey!

    Try putting that code exactly after this line in functions.php:

    if(isset($avia_config['use_child_theme_functions_only'])) return;
    

    Best regards,
    Josue

    #327627

    Josue,

    Thanks for the quick reply. I did that.
    Here is the edited code: http://imgur.com/Ga6gM4d
    But still not showing up in the list: http://imgur.com/6FuFfaa

    #327629

    Do I need to implement the child theme in order to do this? I had it enabled, but do not at the moment.

    #327633

    Hi,

    It is recommended (to avoid update overwriting) but you don’t necessarily have to, i think the code is not working because of the quotes it has, if you look close they are slightly different, all of them must be simple quotes (”).

    I can fix that for you, can you please create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #327706
    This reply has been marked as private.
    #327716

    Hey!

    The font is showing on the list – http://imgur.com/VwueTxS

    Best regards,
    Josue

    #327752

    You are a wizard. THANK YOU!

    #327755

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Add a Google Font to the Advanced Styling List’ is closed to new replies.