-
AuthorPosts
-
September 30, 2014 at 8:44 pm #327575
I have a Google font (Amarante) that I want to use as a font on my site. I have been working on this all day and finally just decided to ask for help. LOL
Here is where I started: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
As instructed, I tried adding that block of code to the end of functions.php.
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Amarante’] = ‘Amarante’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Amarante’] = ‘Amarante’;
return $fonts;
}But, it didn’t have Amarante in the list of available fonts. So… some specific questions.
I found a bunch of similar threads on the support forum with variations of the code listed above, but after trying all of them, none of them showed the font in the font list in the advanced styling editor. Is what I am trying to do possible? I want it added to the list of available fonts via the editor, not just available via CSS.
Do I need to create a child theme for this to work? If I edit the main theme’s functions.php, will it be erased by future theme updates?Feel free to talk to me like a child. I am not an expert in CSS nor web design, which is one of the reasons I went with this theme. :)
September 30, 2014 at 9:18 pm #327597Hey!
Try putting that code exactly after this line in functions.php:
if(isset($avia_config['use_child_theme_functions_only'])) return;
Best regards,
JosueSeptember 30, 2014 at 10:05 pm #327627Josue,
Thanks for the quick reply. I did that.
Here is the edited code: http://imgur.com/Ga6gM4d
But still not showing up in the list: http://imgur.com/6FuFfaaSeptember 30, 2014 at 10:06 pm #327629Do I need to implement the child theme in order to do this? I had it enabled, but do not at the moment.
September 30, 2014 at 10:12 pm #327633Hi,
It is recommended (to avoid update overwriting) but you don’t necessarily have to, i think the code is not working because of the quotes it has, if you look close they are slightly different, all of them must be simple quotes (”).
I can fix that for you, can you please create me an administrator account? post it here as a private reply.
Regards,
JosueSeptember 30, 2014 at 11:13 pm #327706This reply has been marked as private.September 30, 2014 at 11:32 pm #327716October 1, 2014 at 12:02 am #327752You are a wizard. THANK YOU!
October 1, 2014 at 12:11 am #327755You are welcome, glad to help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Add a Google Font to the Advanced Styling List’ is closed to new replies.