-
AuthorPosts
-
February 12, 2016 at 12:45 am #581948
Hi there
Is there a way (via plugin or?) to add many Google fonts to the Enfold Theme without having to manually add each one in functions.php?
Thanks in advance!
Justin
February 12, 2016 at 8:46 am #582091Hey Justin,
Maybe a plugin like this could help you out? https://wordpress.org/plugins/wp-google-fonts/
Regards,
RikardFebruary 12, 2016 at 7:30 pm #582459Yes but that doesn’t then allow me to choose them in the Enfold panel??
February 12, 2016 at 7:38 pm #582464Hi!
You would need to use custom CSS code. We still think it is better to add custom code to functions.php file. If you need help with it, we can gladly help :)
Best regards,
YigitFebruary 12, 2016 at 7:44 pm #582471Ah ok yes i’d rather do something properly. I basically would like to add quite a lot of Google fonts so that I can choose in the drop down control panel which one’s to use.
For example in the first instance how would I add ‘Source Sans Pro’?
Best
Justin
February 12, 2016 at 8:04 pm #582484Hi!
Please add following code to Functions.php file in Appearance > Editor
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Source Sans Pro'] = 'Source Sans Pro:400,700,400italic,700italic'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Source Sans Pro'] = 'Source Sans Pro:400,700,400italic,700italic'; return $fonts; }Regards,
YigitFebruary 12, 2016 at 8:08 pm #582486Thank you! Whereabouts in the functions.php code should i place this?
February 12, 2016 at 8:14 pm #582493February 12, 2016 at 9:10 pm #582504Many thanks that is great. Do you know how i can specify font weights? For example if i wanted Light 300 for the body font?
February 15, 2016 at 1:59 pm #583397 -
AuthorPosts
- You must be logged in to reply to this topic.
