-
AuthorPosts
-
August 18, 2014 at 2:46 pm #305757
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,
Mariebody p, body { font-family: varela round; }August 18, 2014 at 3:04 pm #305766Hi 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,
PeterAugust 18, 2014 at 4:14 pm #305813All right Peter ! I’ll do that. Much better :)
Thank you !
Best regards,
MarieAugust 18, 2014 at 4:17 pm #305816Oups… 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 !
August 18, 2014 at 4:18 pm #305822Hey!
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!
PeterAugust 18, 2014 at 5:17 pm #305858OK thanks !
Cheers !
MarieAugust 18, 2014 at 5:27 pm #305868Hey!
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
<?phptag. Otherwise the code might not work.
Regards,
PeterAugust 18, 2014 at 6:09 pm #305882Insert it after the “what” Peter ?? :)
Thank you again,
MarieAugust 19, 2014 at 5:04 pm #306427Hi!
Yes, bbpress stripped my php tag. I now wrapped it into a code field and it should be readable now :)
Cheers!
PeterAugust 19, 2014 at 6:42 pm #306461OK Thank you Peter !
-
AuthorPosts
- The topic ‘Same google font for body text than for headings…’ is closed to new replies.
