Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #274361

    I have tried following the instructions given below but I still cannot seem to find a way to use multiple weights and styles for the font Open Sans. Can someone please help me better understand? Thanks.

    https://kriesi.at/support/topic/add-new-font/#post-234663

    • This topic was modified 10 years, 5 months ago by JPOsteen.
    #274770

    Hey!

    Put that code in functions.php after line 16:

    if(isset($avia_config['use_child_theme_functions_only'])) return;
    

    Regards,
    Josue

    #275823

    Josue,

    Thanks. I followed your advice, but I can’t find the option anywhere on the back-end to choose what style/weight of the font Open Sans. It appears my only options are still the default 400 or 600 weight.

    Thanks,
    JPOsteen

    #275827

    Hi!

    You’d need to use custom CSS to set the weights, if you tell me which elements you want to affect i can help you with that.

    Regards,
    Josue

    #275834

    For now, I’m trying to adjust the text box under the slider of my home page…but I would like the option to do it in other places as well. Maybe it would be best to set each heading option (H1, H2…) to a particular weight and style so I can choose more easily in the future.

    my website: http://www.LoveRescues.org

    • This reply was modified 10 years, 5 months ago by JPOsteen.
    #275903

    Try adding this code to the Quick CSS:

    #av_section_1 div.avia_textblock * {
        font-weight: 900;
    }

    I’d recommend you to enable this, that way you can apply this mods to specific elements only.

    Cheers! 
    Josue

    #275957

    Josue,
    Thanks for the tip, but I’m trying to use a 300 weight.
    1. When I tried typing 300, by default it still used 400 in firefox.
    2. Where do I turn on the custom CSS field for ALB elements?

    Thanks,
    JPOsteen

    #275958

    Hi!

    1. You are not including the 300 type, check your code in functions.php.

    <link rel=’stylesheet’ id=’avia-google-webfont’ href=’//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,800|Open+Sans:400,600′ type=’text/css’ media=’all’/>

    2. You just have to add this line to functions.php:

    add_theme_support('avia_template_builder_custom_css');
    

    The article i linked explain that in detail.

    Best regards,
    Josue

    #275997

    Josue,

    In your response to my previous #1, I can’t find the code in the functions.php that you are talking about. What you have written looks more like HTML code to me. I’m sorry if I’m coming across as completely ignorant…but I kind of am when it comes to this. :-)

    #275998

    Hi,

    Can you please create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #275999
    This reply has been marked as private.
    #276000

    Use wordpress at kriesi.at

    • This reply was modified 10 years, 5 months ago by Josue.
    #276002
    This reply has been marked as private.
    #276005

    Done:
    http://loverescues.org/

    I modified the code in functions.php:

    $avia_config['posts_on_current_page'] = array();
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Open Sans 2'] = 'Open Sans:300,400,600,800';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Open Sans 2'] = 'Open Sans:300,400,600,800';
    return $fonts;
    }

    Regards,
    Josue

    #276006

    Thanks!

    Will I have to use custom CSS to change font weights on other headings in the future?

    #276010

    For some reason the font weight of that first heading is still showing up as 400 in firefox. Safari is fine, but firefox is not.

    #276138

    Hey!

    It should work now.

    Make sure you always have these settings selected in the Theme Options (Styling):

    Best regards,
    Josue

    #318366

    Josue,

    Hey man, I seem to have lost the option to select “Open Sans 2” since I’ve updated the theme. Can you tell me how to get them back? Thanks!

    #318367

    Hi!

    Add this again to functions.php (after line 16):

    $avia_config['posts_on_current_page'] = array();
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Open Sans 2'] = 'Open Sans:300,400,600,800';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Open Sans 2'] = 'Open Sans:300,400,600,800';
    return $fonts;
    }

    If you want to avoid this every time you update consider using a child theme or a plugin like this to store custom functions separated from the theme core.

    Cheers!
    Josue

    #319381

    Thanks!

    #319397

    You are welcome, always glad to help :)

    Regards,
    Josue

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Open Sans font with multiple weights and styles’ is closed to new replies.