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
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
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?
Thanks man!
Thanks a lot! :)