Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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,
    Marie

    body p, body {
    font-family: varela round;
    }
    #305766

    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

    #305813

    All right Peter ! I’ll do that. Much better :)
    Thank you !
    Best regards,
    Marie

    #305816

    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 !

    #305822

    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

    #305858

    OK thanks !
    Cheers !
    Marie

    #305868

    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

    #305882

    Insert it after the “what” Peter ?? :)
    Thank you again,
    Marie

    #306427

    Hi!

    Yes, bbpress stripped my php tag. I now wrapped it into a code field and it should be readable now :)

    Cheers!
    Peter

    #306461

    OK Thank you Peter !

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Same google font for body text than for headings…’ is closed to new replies.