Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #713800

    hi,
    i’m unable to recreate the font you use on enfold creative studio demo on my existing enfold child theme
    i added roboto light and roboto thin fonts via php editor but they still don’t match the demo

    #713880

    Hey kotlus,

    Could you post a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #714971

    see link below.
    thank you

    #715024

    Hey!

    Can you please let us know how you added them and what code you used to make them work, with what?

    Tanks a lot

    Best regards,
    Basilis

    #715114

    i added roboto and roboto thin with shortcode in php file and then under theme options/general styling i added those fonts plus under theme options / advanced styling i changed the h2 and h3 headings to roboto thin and it still doesn’t show up.

    #716005

    i added roboto and roboto thin with shortcode in php file and then under theme options/general styling i added those fonts plus under theme options / advanced styling i changed the h2 and h3 headings to roboto thin and it still doesn’t show up.

    #716176

    any suggestions based on the above?

    #716193

    Hi!

    Can we see the code option, so we can be sure you are loading it properly?
    Thanks a lot

    Best regards,
    Basilis

    #716195

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Roboto Light’] = ‘Roboto Light:400,700’;
    $fonts[‘Roboto’] = ‘Roboto:400,700,400italic,700italic’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {

    $fonts[‘Roboto’] = ‘PT Sans:400,700,400italic,700italic’;
    $fonts[‘Roboto Light’] = ‘Roboto Light:400,700’;
    return $fonts;
    }

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font_new_ones’);
    function avia_add_heading_font_new_ones($fonts)
    {
    $fonts[‘Roboto Thin’] = ‘Roboto Thin:400’;
    return $fonts;
    }
    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font_new_ones’);
    function avia_add_content_font_new_ones($fonts)
    {
    $fonts[‘Roboto Thin’] = ‘Roboto Thin:400’;
    return $fonts;
    }

    #717370

    Hi,

    The filter looks duplicated. Please replace it with the following code.

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    	$fonts['Roboto Light'] = 'Roboto Light:400,700';
    	$fonts['Roboto 2'] = 'Roboto:400,700,400italic,700italic';
    	return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    	$fonts['Google fonts']['Roboto Light'] = 'Roboto Light:400,700';
    	$fonts['Google fonts']['Roboto 2'] = 'Roboto:400,700,400italic,700italic';
    	return $fonts;
    }

    Best regards,
    Ismael

    #717439

    it crashed my site when i added your code with the following error:

    #718341

    Hi,

    make sure you pasted the code correctly into functions.php of your child theme.

    Send us admin access, so we can have a deeper look into it if it’s still not working for you.

    Best regards,
    Andy

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