-
AuthorPosts
-
June 10, 2021 at 1:26 pm #1305074
Hi guys,
after the new update, google tells me “Make sure the text remains visible while loading web fonts”.
I had already fixed this problem 5 months ago, but it suddenly comes back after the update.It’s a sin, before google had 93 points for the desktop.
Below is the quick CSS inside the Enfold settings, general style:
/*hide auto sidebar from magazine*/
.page-id-2967 .sidebar .widget_nav_hide_child {
display: none;
}/*2.8 firefox problem*/
.avia-image-container-inner, .avia_image {
max-width: 100%;
}#socket .avia-bullet, #socket .avia-menu-fx {
display: none;
}@font-face {
font-family: “Open sans”;
font-display: swap;
}@font-face {
font-family: ‘entypo-fontello’;
font-display: swap;
}@media only screen and (max-width: 767px) {
.main_color .flex_column {
padding: 0 !important;
}
}How can I change these settings to return to the pre-update results?
Thank you.June 14, 2021 at 7:13 am #1305529Hey zibbaldone,
Thank you for the inquiry.
It seems to be referring to the entypo-fontello font. To fix that, try to add the filter that we provided in the following thread.
// https://kriesi.at/support/topic/how-to-implement-relpreload-preload-key-requests-for-font-entypo-fontello/#post-1290768
// https://kriesi.at/support/topic/improving-laoding-of-font-entypo-fontello/#post-1283666Make sure to replace “block” with “swap”.
Best regards,
IsmaelJune 17, 2021 at 2:11 pm #1306187Hi Ismael, thank you for reply.
So.. if I understand, I need to add this :
function avf_custom_font_display( $font_display, $font_name )
{
// Check for a font and change the default theme setting
if( ‘entypo-fontello’ == $font_name )
{
return ‘block’;
}return $font_display;
}add_filter( ‘avf_font_display’, ‘avf_custom_font_display’, 10, 2 );
I have questions about it:
– So…I need to add this in the section: Theme — general style … quick css?
– Before inserting the new code, do I have to remove the following code currently present?
@ font-face {
font-family: “Open sans”;
font-display: swap;
}@ font-face {
font-family: ‘entypo-fontello’;
font-display: swap;
}-Should I copy the new code you suggested to me exactly as you provided it or do I need to put the default theme font in font_name(or other customizations in line with the current ones on the theme)?
Example:
// Check for a font and change the default theme setting
if (‘entypo-fontello’ == $ Open Sans)Please try to tell me exactly what I need to do, if there are other parts to change and where to insert the new code.
Excuse all these questions, I want to make sure I understand and make the change well.
Thanks for your patience.June 20, 2021 at 9:19 pm #1306589Hi,
Thank you for the update.
You have to add the code in the functions.php file, and replace “block” with “swap”. Look for this line..
return "block";
.. and replace it with:
return "swap";
You do not have to change the name of the font. If it is not working, try to use “block” again.
Best regards,
IsmaelJune 21, 2021 at 4:00 pm #1306759Hi Ismael,
thank you for reply.I don’t have in my function.php this line. I attach private link to show my file.
The strange thing is that before the theme update, there wasn’t this problem.
Thank you.
June 23, 2021 at 7:19 am #1307079Hi,
Did you add the code or filter in the functions.php file? You have to add the code manually and change the line that we mentioned above.
Best regards,
IsmaelJune 23, 2021 at 3:39 pm #1307169Thank U Ismael
June 25, 2021 at 4:24 am #1307368Hi,
Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardJune 27, 2021 at 2:03 pm #1307595Hi,
I put the code in the php file, the score hasn’t changed and now it marks me entypo fontello in another section, from “Make sure the text remains visible while loading web fonts” to “Avoid huge network payloads”.Thanks anyway for the help, I appreciated it.
June 29, 2021 at 4:18 am #1307832Hi,
Thanks for the update. Do you need any further help with this?
Best regards,
RikardJune 29, 2021 at 2:02 pm #1307937No, thank you.
July 1, 2021 at 7:45 am #1308235 -
AuthorPosts
- The topic ‘Fontello after new update’ is closed to new replies.