-
AuthorPosts
-
December 10, 2014 at 11:07 am #365893
Hi,
I’ve asked about this before, but it still hasn’t been fixed. Several people show me that on their IE (11 or older), the font we use is not correct. The font itself is correct, but the weight isn’t. It uses regular weights, but not the Light (300) and Extrabold (800).
So I’ve looked again at what Enfold support has suggested before and have added it to my functions.php file:
`add_filter(‘avf_google_heading_font’,’avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Open Sans’] = ‘Open Sans:300,400,600,800’;
return $fonts;
}add_filter(‘avf_google_content_font’,’avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Open Sans’] = ‘Open Sans:300,400,600,800’;
return $fonts;
}`Yet I get 500 server errors once this is added. Besides the font name itself (and adding weight 300), this is the exact same copy of what was suggested. So I don’t know why there’s a syntax error, I’m not a PHP expert.
So please, is there anything I can do to let make those browsers use the correct font weights as well?
Thanks in advance!
December 10, 2014 at 7:30 pm #366195Hey DavyE!
Your semi colons look a bit different. Try adding this to the very bottom of your functions.php file.
add_filter('avf_google_heading_font','avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Open Sans'] = 'Open Sans:300,400,600,800'; return $fonts; } add_filter('avf_google_content_font','avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Open Sans'] = 'Open Sans:300,400,600,800'; return $fonts; }
If your still getting the error then try deleting it and typing it out instead of copying / pasting.
Regards,
Elliott- This reply was modified 9 years, 11 months ago by Elliott.
December 11, 2014 at 11:18 am #366573Hi Elliott,
Thank you for your feedback. Yet I tried both copying your example and typing it in manually. I use Dreamweaver to modify the functions.php file and there were no errors. But as soon as I refresh the website, there’s an Error 500. Removed the piece of code again and the site loads.
Have you tried that code? Or you able to run it without front end errors?
In functions.php, the only line after that code is: // END CUSTOM
I add that to make it easier for myself to see what I have added on top of the theme’s standard code.December 11, 2014 at 11:43 pm #367026Hey!
Send us a WordPress login and we’ll take a look.
Cheers!
ElliottDecember 12, 2014 at 11:05 am #367169This reply has been marked as private.December 12, 2014 at 12:35 pm #367189This reply has been marked as private.December 12, 2014 at 10:52 pm #367534Hey!
I noticed your not getting the error anymore and the fonts seem to be loading fine. Did you get this fixed?
This is what I’m seeing in IE11 so it appears to be working.
Best regards,
ElliottDecember 15, 2014 at 9:53 am #368209Hi Eliott,
The error isn’t there because I removed the script until you might have found a way to fix it. I can’t leave the site with an Error 500 until then.
I haven’t done any other fix, so it’s probably the same thing as what’s confusing me, that some IE browsers show it fine and some don’t, even though the browser versions are identical.
I’ll ask a colleague to take a snapshot of it to show you the difference. There are multiple colleagues that have this issue, so that’s why I’m worried there are many more among outside visitors.
December 15, 2014 at 10:01 am #368211See the difference with your screenshot:
December 15, 2014 at 7:11 pm #368467Hi!
Have them clear their browser cache and make sure compatibility view is turned off.
Cheers!
ElliottDecember 18, 2014 at 11:37 am #369898Apparently it is indeed due to the Compatibility View. Strangely enough, I’ve previously added a rule that forces it OFF when visiting our website and that rule was later even adopted by Enfold in the next version.
So I don’t understand why this causes issues again. Guess I’ll look for an alternative way of force-disabling that. I hope I never have to meet the person that invented Compatibility View. 90% of the issues caused in IE for our website are due to that View.
Anyway, thanks a lot for your time and advice. If you’d happen to know of a way to force-disable that, please let me know!
-
AuthorPosts
- The topic ‘Open Sans Light and Extrabold not working in some IE versions’ is closed to new replies.