Site logo

Archived topic

Why GP Premium contains all google fonts

10 replies · Started by Balendu on August 19, 2021

Viewing posts 1–11 of 11

I am unabe to find all ggogle font in Typography Section. For example I wanted to add fon Livvic on site but it not available.

I have seen but where add these filter??

I am using child theme and when I use below mentioned value then it not saving,

add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'livvic' ] = array(
'name' => 'livvic',
'variants' => array( '100', '100i', '200', '200i', '300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i', '900', '900i' ),
'category' => 'serif'
);

return $fonts;
}

Hi there,

Can you link us to the site in question? So we can inspect and check things and get an idea of why it's not loading.

While waiting. Livvic is under san-serif category. Check this - https://fonts.google.com/specimen/Livvic

I have activated the child theme but when I open function.php and save then it shows a saving error. I am providing login details in private information, kindly see the error and guide me to fix it.

Can you try this?

add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );

function tu_add_google_fonts( $fonts ) {
    $fonts[ 'livvic' ] = array(
        'name' => 'Livvic',
        'variants' => array( '100', '100i', '200', '200i', '300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i', '900', '900i' ),
        'category' => 'san-serif'
    );
    
    return $fonts;
}

When I adding this code in function.php and clicking on the update file buttn then it shows following error - Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.

It was a problem with serverside that is now fixed and the code is working fine.
Thanks,

Nice one. Thanks for letting us know. Glad to be of any help. :D

This archived topic is closed to new replies.