Theme Author
Tom
(@edge22)
I added that 2 code with Code Snippets plugin.
I replace ‘name’ => ‘Zilla Slab’ with ‘name’ => ‘Lato’,
I set both snippets in “Run Snippet Everywhere”
But i can’t see google fonts list in Article section.
I don’t understand why :-/
Thank you TOm
Theme Author
Tom
(@edge22)
Can you share the exact code snippet you added with me?
Be sure to highlight it and click the “code” button in the editor.
Sure.
In the Snippets plugin, I added:
add_filter( 'generate_number_of_fonts','tu_show_fifty_google_fonts' );
function tu_show_fifty_google_fonts() {
return 50;
}
and then this:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'zilla_slab' ] = array(
'name' => 'Lato',
'variants' => array( '300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i' ),
'category' => 'serif'
);
return $fonts;
}
Google fonts are available in Customizes section of Generatepress, but they aren’t in the Article section when i try to choose the font.
Theme Author
Tom
(@edge22)
Try this instead:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'lato' ] = array(
'name' => 'Lato',
'variants' => array( '300', '300i', '400', '400i', '700', '700i', '900', '900i' ),
'category' => 'sans-serif'
);
return $fonts;
}
I tried….but doesn’t works.
No problem..i write articles with Georgia ;-(
Thanks Tom
PS: Where can I learn how to change template for my pages? I want pages look different from article