Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #908091

    Hi guys,

    I tried adding a new Google Font to my Child Theme using this code:

    if(isset($avia_config[‘use_child_theme_functions_only’])) return;

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    $fonts[‘Josefin Sans’] = ‘Josefin Sans:300,300i,400,400i,700,700i’;
    return $fonts;

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    $fonts[‘Josefin Sans’] = ‘Josefin Sans:300,300i,400,400i,700,700i’;
    return $fonts;

    But the font only appears in the Heading font and not in the content font options… Do you guys have any idea of what I am doing wrong ?

    • This topic was modified 3 years, 9 months ago by  pberquet.
    #908210

    Hey pberquet,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.

    Best regards,
    Basilis

    #908476

    Hi,

    Thanks for the quick response. I added a user for your guys: details in private content

    #908961

    Hi pberquet,

    The code you’re using is not correct. Here is the correct code

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #909704

    Hi,

    This code doesn’t work either. I am getting this message :

    “Cannot redeclare avia_add_heading_font() (previously declared in wp-content/themes/enfold-child/functions.php:13)”

    #909973

    Hi,

    That means you have added the code before and you have loaded new fonts already!

    Best regards,
    Basilis

    #910182

    Yes but the problem was that my font doesn’t appear in the content font options…

    #910865

    Hi,

    We modified the code a bit. The font is now selectable under the Fonts > Body text > Google fonts section.

    Best regards,
    Ismael

    #910976

    Thanks ♥️

    #911047

    Hi pberquet,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.