Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #606955

    Hi! What part of “Enfold Theme Options” controls the font of the main menu (where to change the font) ? Thanks!

    #606956

    Sorry, found it!

    #607173

    Hi,

    No problem, glad you found it :-)

    Best regards,
    Rikard

    #607255

    I read a lot of threads here on how to add extra google fonts, including this article: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/ . Got confused because most of the threads contain a lot of multiple information. I also read,if I’m not mistaken, that this entry in child theme’s functions.php will add the font family and not the specific font type (bold, italic etc).

    I would like to add “Cardo Normal 400 Italic” and later use it for my main header menu by selecting it in “Advanced Styling” Theme options.

    Could you please walk me through the steps?

    #607404

    Hi,

    The documentation walks you through pretty well I think, where did you encounter problems and what code did you try?

    Regards,
    Rikard

    #607813

    Hi Rikard,
    Since I don’t understand anything in all these codes, I usually don’t proceed with something when I’m confused and try to get more information before acting :)

    I went ahead and tried inserting this in my child’s theme functions.php file:

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Cardo 400italic'] = 'Cardo:400italic';
    return $fonts;
    }
    

    It seems that it worked.

    I would appreciate if you could still clarify a few things for me:

    1) http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
    The example has the same stuff written twice, only the order of font families is changed. I guess it’s done for the sake of example and I only need to have it written once, correct ?
    Or do I actually need to insert it twice as stated in the example?

    2) To better understand the functionality I tried entering the exact example from the documentation.
    $fonts[‘PT Sans’] = ‘PT Sans:400,700,400italic,700italic’;
    This entry it states 4 different font weights/styles at once.
    – How do I select winch font wight/style I want to use when selecting PT Sans font in “Advanced Styling” options?
    – What’s the purpose of specifying 4 different weights at once ?

    Many thanks!

    #608798

    Hi!

    1.) It’s not the same stuff, it’s different, so use it exactly like this.

    2.) The purpose is that you can choose between 4 different font weights this way. You can’t select a specific font to style in advanced styling settings. Tell us what you want to achieve exactly and we help to do it.

    Best regards,
    Andy

    #609108

    1) Not sure what to do with this 2 lines:
    $fonts[‘PT Sans Narrow’] = ‘PT Sans Narrow:400,700’; ( I changed this to $fonts[‘Cardo 400italic’] = ‘Cardo:400italic’; )
    $fonts[‘PT Sans’] = ‘PT Sans:400,700,400italic,700italic’; ( I erased this line )

    Is this the correct way (below) ?

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Cardo 400italic'] = 'Cardo:400italic';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Cardo 400italic'] = 'Cardo:400italic';
    return $fonts;
    }

    2) Can I make it selectable by writing out and naming each font weight individually ?

    #609545

    Hey!

    1.) Looks good, so just try it and let us know if you still need help with it afterwards.

    2.) Not sure what you mean by “writing out and naming each font weight individually”, but as shown here you can include different font weight inside the code at the same time.

    Best regards,
    Andy

    #609645

    Hi!

    1) How do I specify multiple fonts at once ?

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Cardo 400italic'] = 'Cardo:400italic';
    $fonts['PT Sans Narrow 400'] = 'PT Sans Narrow:400';
    $fonts['PT Sans700'] = 'PT Sans:700';
    $fonts['PT Sans400'] = 'PT Sans:400';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Cardo 400italic'] = 'Cardo:400italic';
    $fonts['PT Sans Narrow 400'] = 'PT Sans Narrow:400';
    $fonts['PT Sans700'] = 'PT Sans:700';
    $fonts['PT Sans400'] = 'PT Sans:400';
    return $fonts;
    }

    Correct ?

    #609649

    Hey!

    Yes, your code is correct.

    Cheers!
    Yigit

    #609656

    2) Andy wrote “You can’t select a specific font to style in advanced styling settings”. What I meant is that I want to be able to select each weight font in the styling settings. How do I achieve that ?
    Do I name and write out each one individually, like I did in post my post #609645 ?

    #609660

    Hi!

    You can add following code to Quick CSS in Enfold theme options under General Styling tab and adjust the value as needed

    .av-main-nav > li > a {
        font-weight: 100;
    }

    Please make sure that > sign is not converted to – http://i.imgur.com/IDXRZQ3.png in Quick CSS field.

    Regards,
    Yigit

    #609663

    Can I just do it as written in post #609645 ?

    #609669

    Hi!

    Sure, you can use 400 or 700 and/or italic as following

    .av-main-nav > li > a {
        font-weight: 700;
       font-style: italic;
    }

    Best regards,
    Yigit

    #609672

    Sorry, I’m confused now.
    Where do I specify the font’s name ? I would like them all to appear in settings->”advanced styling ”
    Is it necessary to use this code for Quick CSS when I already edited functions.php file with this entries:
    $fonts[‘Cardo 400italic’] = ‘Cardo:400italic’;
    $fonts[‘PT Sans Narrow 400’] = ‘PT Sans Narrow:400’;
    $fonts[‘PT Sans700’] = ‘PT Sans:700’;
    $fonts[‘PT Sans400’] = ‘PT Sans:400’;

    ?
    Thank you for your help!

    #609682

    Hi!

    The code you used here – https://kriesi.at/support/topic/main-menu-font-type/#post-609645 adds new font families/font weights to the theme that you can use in Advanced Styling tab of Enfold theme options. After choosin font family in Enfold theme options, you can use custom CSS code i posted here – https://kriesi.at/support/topic/main-menu-font-type/#post-609669 to change font weight and style

    Cheers!
    Yigit

    #609689

    Clearer, thank you !

    Can I just name each for weight individually like this (where I name each font+wight separately) and NOT use Quick CSS:
    $fonts[‘PT Sans700’] = ‘PT Sans:700’;
    $fonts[‘PT Sans400’] = ‘PT Sans:400’;

    And not like this , where all wights specified at once:
    $fonts[‘PT Sans’] = ‘PT Sans:400,700,400italic,700italic’;

    Sorry for being annoying :)

    #610936

    Hey!

    Yes, you can do that. :)

    Cheers!
    Ismael

Viewing 19 posts - 1 through 19 (of 19 total)
  • You must be logged in to reply to this topic.