Tagged: google fonts
-
AuthorPosts
-
October 10, 2017 at 5:59 pm #862601
Hi, i added the following lines to my functions.php:
/* Enter your custom functions here */ add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Alegreya Sans SC Regular'] = 'Alegreya Sans SC Regular'; $fonts['Poiret One Regular'] = 'Poiret One Regular'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Karla'] = 'Karla'; return $fonts; }
And did these Settings in the enfold options: https://gyazo.com/7261ed44fa3b3f7f5141a36ea7c4b029
Problem is, that the font is replaced with a standard font when i view the page. What am i doint wrong?Kind regards joschi
October 11, 2017 at 2:40 pm #862901Hey j0schi,
Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.
Best regards,
RikardOctober 11, 2017 at 3:00 pm #862912Sure. this problem seems to appear on multiple of my sites. have a look. You can see the effect on the first 2 headings.
Kind regards
PatrickOctober 12, 2017 at 10:19 am #863308Hi Patrick,
h1 looks like the one you set there in the settings.
h2 has Karla
and h3 has Poiret One Regular’, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;So it looks right to me. Could you please clear the cache, check again and get back to us. Or point us to a page where the styles are not working.
Best regards,
VictoriaOctober 12, 2017 at 5:46 pm #863553Hi Victoria, thank you for pointing this out.
so here is what it looks like (and should look like) when i remove the other fonts.
https://gyazo.com/b1e856b08e8a53f90eae78561a92af09so how do i remove the other fonts ‘Helvetica Neue’, Helvetica, Arial, sans-serif; from the h3?
Thank you :)
October 16, 2017 at 5:27 am #864636Hi,
Why do you have to remove the fallback fonts? They are required for systems that don’t support google fonts. It’s not working because the google fonts are not loaded correctly.
// http://fonts.googleapis.com/css?family=Karla%7CPoiret+One+Regular%7CAlegreya+Sans+SC+Regular
Please replace the filter in the functions.php file then reselect the font in the General Styling and Advanced Styling panel.
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Alegreya Sans SC Regular'] = 'Alegreya+Sans+SC:400,700'; $fonts['Poiret One Regular'] = 'Poiret+One'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Google fonts']['Karla'] = 'Karla'; return $fonts; }
Best regards,
IsmaelOctober 16, 2017 at 3:42 pm #864852Hi Ismael,
Thank you for pointing this out and the fast support! That is why i use enfold and meanwhile own 14 licences of it haha :) BTW, How many more do i have to buy to get one free? ;)
I just asked how to remove the “fallback Fonts” because i did not know they are used as a fallback.However, the Problem seems to be not solved, i tested different Browsers and still the font on the page looks very different from the one shown on google fonts, as you can see on the following screenshot.
https://gyazo.com/16e669f185906b66aa48ab34f303f980Am I still doing something wrong?
Kind regards
PatrickOctober 17, 2017 at 6:29 am #865147Hi,
Please edit the following lines.
$fonts['Alegreya Sans SC Regular'] = 'Alegreya+Sans+SC:400,700'; $fonts['Poiret One Regular'] = 'Poiret+One';
Remove the + symbol.
$fonts['Alegreya Sans SC Regular'] = 'Alegreya Sans SC:400,700'; $fonts['Poiret One Regular'] = 'Poiret One';
Re-select the font again afterwards. If it’s not working, add this css code.
#top #wrap_all .all_colors h3 { font-family: 'Poiret One', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: normal; }
I wish I could give you a free license.Thank you for sticking with Enfold. :)
Best regards,
IsmaelOctober 17, 2017 at 1:54 pm #865281Hey Ismael, that worked, thank you!
But basically its the same code i used before i asked a question here haha :D i must have done something funny with it ;)
Well i think i will own 15 licences before i ask the next question, have to buy one for my next customer. thanks for creating such a great theme!October 18, 2017 at 8:28 am #865573 -
AuthorPosts
- You must be logged in to reply to this topic.