Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #660262

    Hi, i’ve added in my child functions.php this code:

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts) {
    	$fonts['Open Sans'] = 'Open Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext';
    	$fonts['Lato'] = 'Lato:300,300italic,400,400italic,700,700italic,900,900italic&subset=latin,latin-ext';
    	return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts) {
    	$fonts['Open Sans'] = 'Open Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext';
    	$fonts['Lato'] = 'Lato:300,300italic,400,400italic,700,700italic,900,900italic&subset=latin,latin-ext';
    	return $fonts;
    }

    But it doesn’t work (on machine without fonts installed): looking at code, i see this in head:

    <!-- google webfont font replacement -->
    <link rel='stylesheet' id='avia-google-webfont' href='//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900,900italic&subset=latin,latin-ext%7COpen+Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext' type='text/css' media='all'/> 

    and

    <link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.5.3' type='text/css' media='all' />

    Could it be encoding problem? if you click eg on the first link with pipe “%7C” it’s a 404…

    Thanks

    #660409

    Hi Nomesia!

    Do you mind creating a temporary admin login and posting it here privately so we can look into it?

    Regards,
    Yigit

    #660414

    Hi, private answer with it, thanks=)

    #660830

    Hi,

    Have you added the fonts elsewhere? When i comment it out in functions.php file of your child theme, i still can see them in source code

    Best regards,
    Yigit

    #660857

    Hi,

    no i’ve edited functions.php, style.css of child theme (font-family for some elements) and i’ve set them in “fonts” tab theme settings…

    #662070

    Hi,

    There might be some corrupted files, so please delete all theme files completely via FTP, before installing a fresh copy from your themeforest account. Here is a short tutorial on how to install the theme via FTP, in case you are not sure how that works:

    Best regards,
    Andy

    #662186

    No results:(

    The problem is that selecting in font tabs Lato for heading and Open Sans for body, it generates a 404 for “http://fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900,900italic&subset=latin,latin-ext%7COpen+Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext&#8221;

    i need all font weights, not only the google font theme ones…

    #662274

    I’ve noticed this issue with the update recently myself… I tried to add this in the functions.php still nothing showing up. Last time I added a google font it worked fairly simple.

    if ( !defined('ABSPATH') ){ die(); }
    
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Carter One'] = 'Carter One';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Carter One'] = 'Carter One';
    return $fonts;
    }
    #662461

    @Phil
    Please open your own ticket about this, otherwise it gets too confusing in this thread.


    @Nomesia

    When using Google fonts you can only use the font weights which Google is providing.
    Maybe this plugin is for you: https://de.wordpress.org/plugins/easy-google-fonts/

    Best regards,
    Andy

    #732839

    I’ve installed the Easy Google Fonts plugin but not all of the fonts are displaying in the font dropdown in the Enfold Theme.

    #733012

    Hi @ipoint,

    Did you bring the issue up with the plugin authors?

    Best regards,
    Rikard

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