-
AuthorPosts
-
November 11, 2013 at 10:41 am #186785
Hi
I found here
https://kriesi.at/support/topic/new-custom-font/
how to add a custom font.Now i would like to use another google font, just for the h1 tags.
So i got this google font:
http://www.google.com/fonts#UsePlace:use/Collection:Indie+Flower
Where do i place the code from “3. Add this code to your website:” ?Thanks for answers
November 12, 2013 at 10:48 pm #187490Hey wesdacar!
You should add new font as you did previously https://kriesi.at/support/topic/new-custom-font/#post-121900
Cheers!
YigitNovember 13, 2013 at 8:53 am #187647When i try to add a second font like this:
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Tinos’] = ‘Tinos:400,700’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Tinos’] = ‘Tinos:400,700’;
return $fonts;
}add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Indie_Flower’] = ‘Indie+Flower’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Indie_Flower’] = ‘Indie+Flower’;
return $fonts;
}then i got a “500 server error” and the pages don’t load anymore.
how is the proper way to add multiple google fonts?
November 14, 2013 at 4:20 am #188193Hey!
Please add this on your functions.php:
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Indie Flower'] = 'Indie Flower'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Indie Flower'] = 'Indie Flower'; return $fonts; }
There are lots of h1 elements on the theme. You can apply the font on your Quick CSS or custom.css:
h1 { font-family: 'Indie Flower', cursive !important; }
Regards,
IsmaelNovember 14, 2013 at 11:43 am #188305Thanks Ismael.
I think i didn’t explain well what my issue is.When i’m adding 1 font that way, there is no problem,
Just when i add a second font with the same code, below the code from the first font,( like in the example in my post above)
then the pages on my website do not load anymore.November 15, 2013 at 4:00 pm #189240Hi!
I believe the proper syntax would be:
add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Indie Flower'] = 'Indie Flower'; $fonts['Indie Flower'] = 'Indie Flower'; $fonts['Indie Flower'] = 'Indie Flower'; $fonts['Indie Flower'] = 'Indie Flower'; return $fonts; }
Where each new line is a new font that gets added to $fonts.
Regards,
DevinNovember 17, 2013 at 9:28 pm #189844Yo Devin
That works fine.
Thanks a lot.
Cheers -
AuthorPosts
- The topic ‘multiple custom fonts’ is closed to new replies.