- This topic has 14 replies, 2 voices, and was last updated 3 years, 7 months ago by
Tom.
-
AuthorPosts
-
September 26, 2018 at 11:06 am #687058
Halil
Hi,
I am having heavy flickering problem with my site on chrome and edge (edge is lesser flickering)
I have attached a video link.I tried to disable almost all of the plugins, tried on 2 different laptops, same result.
https://www.youtube.com/watch?v=6oDvQsecptkWhat can be the reason?
GeneratePress 2.1.4GP Premium 1.7.2September 26, 2018 at 6:30 pm #687275Tom
Lead DeveloperLead DeveloperHi there,
This is happening because of your icons.
You’re loading Font Awesome in the footer, which means your page loads before the icons load.
If you load Font Awesome in the
<head>
instead, the flicker will go away.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 27, 2018 at 11:53 am #688017Halil
Thanks for help Tom, but could u pls describe what to do to load font awesome in the head? I really dont know how to do it and it is beyond my knowledge, that’s all started after changing setting in gp regarding font awesome.
I tried severa methods but couldnt achieve it.
September 27, 2018 at 5:20 pm #688167Tom
Lead DeveloperLead DeveloperHow are you adding Font Awesome? Function or plugin?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 27, 2018 at 9:41 pm #688252Halil
I am not using any plugin for font. While ago, I have changed the setting in GP to use minimal fontawesome, after that change in settings it’s gone and fontawesome is now being provided thru bootstrapcdn.
In the functions.php I see nothing regarding fontawesome. What should I do?
September 27, 2018 at 9:43 pm #688253Halil
and if posible I’d like to serve it from my own web server, cause I am already using another cdn.
September 28, 2018 at 9:34 am #688722Tom
Lead DeveloperLead DeveloperHow is it being served through bootstrap cdn? There must be a function or plugin added to your site which is adding it. We need to find out how it’s being added so we can adjust those settings to load it in the
<head>
.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 28, 2018 at 10:50 am #688803Halil
Well I really dont know, after changing the settings for fontawesome in GP it started serving thru bootstrapcdn?
Never seen that before.And I couldnt see any code referencing bootstrap cdn in the functions.php.
Would u like to have a look at it? I can add you as admin?
September 28, 2018 at 1:52 pm #688918Halil
I think I found out which plugin it is.
I have disabled it.What should I wrote to functions.php to enable load fontawesome in the head?
September 28, 2018 at 7:48 pm #689063Tom
Lead DeveloperLead DeveloperThis might help: https://docs.generatepress.com/article/font-awesome/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 28, 2018 at 11:15 pm #689129Halil
although it seems easy to edit, I couldnt achieved that. Here is the code that plugins load fontawesome from local server. I have loaded all the fonts into my theme/fonts folder and css to theme/css. It now loads font awesome locally. How can I edit this code to load it in the head?
add_action( 'su/assets/register', function() { wp_deregister_style( 'font-awesome' ); wp_register_style( 'font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.min.css', array(), '4.7.0', 'all' ); } );
September 29, 2018 at 4:43 am #689247Halil
Tom,
with the following code, I have loaded font awesome and hopefully it loads in the head? Header stopped flickering but sidebar still flickers.add_action( 'su/assets/register', function() { wp_deregister_style( 'font-awesome' ); } ); add_action( 'wp_enqueue_scripts', function() { wp_register_style( 'font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.min.css', array(), '4.7.0', 'all' ); wp_enqueue_style( 'font-awesome' ); } );
September 29, 2018 at 10:39 am #689486Tom
Lead DeveloperLead DeveloperIt looks much better to me now. There will always be a small “flash” as the icons load, which is the same with any custom font (icon or text).
Without doing a hard refresh, the icons don’t flash at all for me anymore ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2018 at 12:23 am #689778Halil
thanks.
September 30, 2018 at 9:31 am #690065Tom
Lead DeveloperLead DeveloperNo problem ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.