Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #694574

    I want to define a new font for all headings and bodies which is not included in the font list;

    I have 2 question about it:

    1- I want to add “playfair display”-font. Is the follownig code correct?

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

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

    $fonts[‘Playfair Display’] = ‘Playfair Display:400,700,400italic,700italic’;
    $fonts[‘Playfair Display Narrow’] = ‘Playfair Display Narrow:400,700’;
    return $fonts;
    }

    2-On Enfold has 2 Function.php. Which one should mentioned code add to?

    – wp-content/themes/enfold/functions.php
    or
    – wp-includes/functions.php

    #694579

    Hi tennetno!

    Please edit functions.php file and find following line

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

    and place your code right below that line

    Cheers!
    Yigit

    #694583

    Thanks Yigit,

    I’ve placed it but this error appears when you open http://www.webpluss.no/

    Parse error: syntax error, unexpected ‘Display’’ (T_STRING), expecting ‘]’ in /customers/4/a/1/webpluss.no/httpd.www/wp-content/themes/enfold/functions.php on line 22

    Would you check the code?

    #694587

    Hi!

    Sure! Please post FTP logins and WP admin logins here privately

    Regards,
    Yigit

    #694596

    Thanks man!

    #694599

    Hey!

    I fixed the issue. Please review your website now :)

    Regards,
    Yigit

    #694617

    Thanks a lot! :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Define a new font’ is closed to new replies.