-
AuthorPosts
-
October 23, 2016 at 9:17 pm #703063
Hi,
I’m trying to install additional Google Fonts for Enfold.
Unfortunately I’m only able to break WordPress with that..I pasted this code into the functions.php using the “functionality” plugin for wordpress.
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Pathway Gothic One'] = 'Pathway Gothic One:400'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Pathway Gothic One'] = 'Pathway Gothic One:400'; return $fonts; } add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; return $fonts; }
The following error occurs:
Fatal error: Cannot redeclare avia_add_heading_font() (previously declared in […]/wp-content/plugins/functionality/functionality.php:76) in […]/wp-content/plugins/functionality/functionality.php on line 94October 24, 2016 at 1:35 pm #703252Hi csuffel!
I added the code to functions.php file in Appearance > Editor as following
add_filter( 'avf_google_heading_font', 'avia_add_heading_font_new'); function avia_add_heading_font_new($fonts) { $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; $fonts['Pathway Gothic One'] = 'Pathway Gothic One:400'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font_new'); function avia_add_content_font_new($fonts) { $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; $fonts['Pathway Gothic One'] = 'Pathway Gothic One:400'; return $fonts; }
Please review your website now
Cheers!
YigitOctober 24, 2016 at 11:08 pm #703472Thank you very much Yigit!
October 25, 2016 at 12:09 am #703481Hi,
Glad we could help!
We really appreciate it if you rate our theme on themeforest https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Vinay -
AuthorPosts
- The topic ‘Google fonts w/o Child Theme’ is closed to new replies.