Tagged: font weight
-
AuthorPosts
-
November 25, 2014 at 1:48 am #357287
Hello. Font weights for headings in my stylesheet are not working since I did an Enfold update yesterday.
When I’m logged in, font weights are 300, but switch to 400 when logged out.Any idea why this might be happening? Thanks.
Not to complain too loudly, you guys offers pretty good support…but I’m concerned about my site breaking every time Enfold is updated. Enfold broke with the last WP update and I’ve had to apply several fixes after updating Enfold. Mostly fixes to the way enfold is applying styles. If these are changed with each Enfold update, anyone using the theme will spend hours chasing down bugs and fixing them every time they update the theme. Just my two cents.
Not updating Enfold or WordPress is an option to ensure a stable experience, but not practical.
November 25, 2014 at 8:06 pm #357861Tried everything in Enfold to fix the fact that Opens Sans 300 loads when logged in but not when logged out.
Had to add the following manually to my child theme header before the closing </head> tag.
<link rel=’stylesheet’ id=’open-sans-css’ href=’//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.0.1′ type=’text/css’ media=’all’ />
Adding this fixed it of course, but wish it could have been done within Enfold.
November 25, 2014 at 8:07 pm #357862Hey Tomzilla!
Sorry about the problems your having. It looks like you have it set to 300.
h1.main-title.entry-title, h1, h2, h3, p.tagline, .av-subheading { font-family: "Open Sans"; font-weight: 300 !important; } .avia_textblock h2, .avia_codeblock h2 { font-weight: 300 !important; }
Did you make sure to clear your browser cache and any caching related plugins? What happens when you deactivate all plugins?
If your still having problems then send us a WordPress login and we’ll take a closer look.
EDIT: It looks like you replied right before me. Go ahead and send us a login in a private reply and we’ll take a look.
Cheers!
Elliott- This reply was modified 10 years, 1 month ago by Elliott.
November 25, 2014 at 9:19 pm #357940Hi Elliot. Thanks. You missed or didn’t read my last post ;-) I fixed this but please do read this. I see others are having similar problems.
I cleared cache, disabled plugins. Tried resetting fonts in settings. I have no cache plugin.
My “manual” fix below resolved the problem:
I added: <link rel=’stylesheet’ id=’open-sans-css’ href=’//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.0.1′ type=’text/css’ media=’all’ /> to the child theme’s header.php
FYI:
Enfold was not loading open sans 300 in <head> when logged out. I could clearly see that it was not in source, so adding to my custom header worked, but this should not be necessary. This symptom began after I updated two days ago. Before that it was fine.This should be fixed in Enfold.
Here is a user with similar problem:
https://kriesi.at/support/topic/special-heading-thin-font-type-changes-to-helvetica-when-i-log-out-of-wp-admin/The fixes suggested in the thread (like adding a custom function) did nothing for me.
Thanks anyway!
November 26, 2014 at 5:56 am #358172Hey!
Glad you fixed it. You can also add this filter on functions.php right below line 16:
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Open Sans 2'] = 'Open Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400''; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Open Sans 2'] = 'Open Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400''; return $fonts; }
Select Open Sans 2 on Enfold > General Styling > Fonts panel.
Regards,
IsmaelNovember 26, 2014 at 10:10 pm #358585Thanks Ismael. I’ll try this.
I did try another version of function that was offered as a solution to another user but it did not work. Maybe this one will.
Thanks again.
November 27, 2014 at 1:29 am #358739Hi!
Please try and let us know so we can mark the thread as resolved or assist you further
Cheers!
YigitNovember 27, 2014 at 6:47 pm #359121The function above didn’t work. As I said, I tried it before but thought it might be different.
I’ll stay with the calling the stylesheet from head but if you guys figure out a fix for this, please let me know. Thanks!You also have extra (‘) marks at the end of two lines:
$fonts[‘Open Sans 2’] = ‘Open Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400”;
and
$fonts[‘Open Sans 2’] = ‘Open Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400”;
November 29, 2014 at 5:39 am #360009Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueDecember 5, 2014 at 3:56 pm #363589@Tomzilla: Please read my post. It offers 2 function-based solutions to fix this issue:
Solution #1 tells you step-by-step how to get @Josue’s function working (it works perfectly fine).
Solution #2 is a function I wrote myself. It checks whether the line that disappears, after logging out of WP, is in the header. I mean the following line:<link rel=’stylesheet’ id=’open-sans-css’ href=’//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.0.1′ type=’text/css’ media=’all’ />
If the above line is not in the header (e.g. when you’re logged out of WP), then the function will add this line to your site’s header. Making your site’s logged in and logged out versions look exactly the same. And it’s no longer required to add this line manually to the (child) theme’s header, which is how you currently fixed the issue.
Here’s my post explaining everything in detail: https://kriesi.at/support/topic/header-fonts-rendered-thicker-when-logged-out/#post-363534
Hope this helps!
Best,
Ralph
December 8, 2014 at 12:36 am #364369December 8, 2014 at 12:50 pm #364589No problem, @Josue!
Also, please read my latest post. The UPDATE part will clear everything up :)
Kind regards,
Ralph
-
AuthorPosts
- The topic ‘Font weight is 400 logged out but 300 when logged in (what I want)’ is closed to new replies.