Hey,
Let’s say I want to use Varela Round for both headings AND body texts -> since Varela can’t be chosen in Theme options list for “body text” (wondering why by the way…), can I still use it by adding custom css ? like below ?
Thanks. Cheers,
Marie
body p, body {
font-family: varela round;
}
Hi marienoisette!
If you want you can add the Varela Round font to the admin page body font dropdown – insert this code into the enfold or child theme functions.php file:
add_filter('avf_google_content_font','avia_add_new_heading_font');
function avia_add_new_heading_font($fonts)
{
$fonts['Varela Round'] = 'Varela Round';
return $fonts;
}
and then go to the admin page and select the font from the dropdown.
Regards,
Peter
All right Peter ! I’ll do that. Much better :)
Thank you !
Best regards,
Marie
Oups… I’v read your code too fast. The thing is that Varela is already in “heading fonts” list. I’d like to add it in the “body text” list. Your code is talking about “heading fonts”… ? Normal ? Thanks !
Hey!
Yes – it’s just the function name. Actually I re-used some code someone needed to add a new font to both dropdowns (heading + body font). The important thing is the filter/hook name and I used the correct filter called “avf_google_content_font”.
Cheers!
Peter
OK thanks !
Cheers !
Marie
Hey!
Great, please let me know if it doesn’t work because of whatever reasons. One thing I forgot to mention – if you add the code to the enfold/functions.php file because you don’t use a child theme insert it at the very top after the
<?php
tag. Otherwise the code might not work.
Regards,
Peter
Insert it after the “what” Peter ?? :)
Thank you again,
Marie
Hi!
Yes, bbpress stripped my php tag. I now wrapped it into a code field and it should be readable now :)
Cheers!
Peter
OK Thank you Peter !