Tagged: 

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

    Hi,

    I want to include more google fonts possibilities in the Backend.
    Do you have a way for that: Plugin or code?

    Thanks.

    #519448
    #520789

    Hi Elliott,

    thanks.

    In the case of installing a new google font / visisble on the backend: Does it always need the full code of this example or only parts of it?

    Regards Sven

    #520793

    I think this is the solution – correct?

    Only cpmplete the existing code with
    $fonts[‘Google Font Name’] = ‘Google Font Name:400,600,800…’;

    Thanks

    #521152

    Hey!

    You would just switch out the name of the font in both instances. The 400, 700, etc etc, refers to how many “weights” you want to have included. The more weights and styles you include the bigger the font file will be.

    Cheers!
    Elliott

    #521456

    Moin,

    this is clear, I meant another thing.

    For example, I want to add 3 more google fonts. I use this code one time in the functions.php and only add the following fonts inside at the following places. Correct?

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700';
    $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic';
    $fonts[‘Google Font Name1’] = ‘Google Font Name1:XXX,XXX,XXX…';
    $fonts[‘Google Font Name2’] = ‘Google Font Name2:XXX,XXX,XXX…';
    $fonts[‘Google Font Name3’] = ‘Google Font Name3:XXX,XXX,XXX…';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic';
    $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700';
    $fonts[‘Google Font Name1’] = ‘Google Font Name1:XXX,XXX,XXX…';
    $fonts[‘Google Font Name2’] = ‘Google Font Name2:XXX,XXX,XXX…';
    $fonts[‘Google Font Name3’] = ‘Google Font Name3:XXX,XXX,XXX…';
    return $fonts;
    }
    #522019

    Hey!

    Yep, that will work.

    Regards,
    Elliott

    #522179

    Thanks!

    #522725

    Hi,

    Glad we could help :-)

    Regards,
    Rikard

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