Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #685143

    Hello

    I created a child theme and then created a functions php with the content below and uploaded it to the child theme but it broke the site, so I removed it and it has gone back to normal. Please let me know what I am doing wrong. I am trying to get the google fonts Gabriela https://fonts.google.com/specimen/Gabriela?selection.family=Gabriela and Fredericka the Great https://fonts.google.com/specimen/Fredericka+the+Great added to the font options in the theme options.

    <?php

    /* Custom code goes below this line. */

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Fredericka the Great’] = ‘Fredericka the Great:400,600,800’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Fredericka the Great’] = ‘Fredericka the Great:400,600,800’;
    return $fonts;
    }

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Gabriela’] = ‘Gabriela:400,600,800’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Gabriela’] = ‘Gabriela:400,600,800’;
    return $fonts;
    }

    /* Custom code goes above this line. */
    ?>

    #685304

    Hey sensiblekaren,

    Thanks for reaching out to us!

    Did you receive any error messages when the code broke the site?

    Also ensure you are following the instructions found here – http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/

    If you still experience any issues, please send us login details to your admin panel so that we can take a closer look.

    Best regards,
    Jordan

    #702063

    Hi guys, I’m struggling with adding additional google fonts.
    I can’t find my child themes functions.php file anywhere.
    Can you please help guide me where to find the file or perhaps you can go in and edit the file to reflect the new fonts?

    The fonts I’d like to add are

    font-family: ‘Rochester’, cursive;
    font-family: ‘Italianno’, cursive;
    font-family: ‘Allura’, cursive;
    font-family: ‘Parisienne’, cursive;

    • This reply was modified 8 years, 1 month ago by Eric_A. Reason: Noticed you had this font installed already
    #702220

    Hi,

    You are not using a child theme so please create one first, you can download one here: http://kriesi.at/documentation/enfold/downloads/. Your edits will be lost on updates if you don’t use one.

    Once you have installed the child theme you will find the functions.php file under Appearance->Editor.

    Thanks,
    Rikard

    • This reply was modified 8 years, 1 month ago by Rikard.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.