- This topic has 14 replies, 2 voices, and was last updated 3 years, 7 months ago by David.
-
AuthorPosts
-
July 13, 2020 at 2:25 am #1361638ustar
Hi, GP team!
I have noticed that my site has problem “CLS issue: more than 0.25 (mobile)” in GSC.
All of product pages only.All Typography settings are in “System Stack” Font family already long time.
What else i can do to fix this issue?
Thanks in advance!Regards, Sergey.
July 13, 2020 at 3:16 am #1361686ustar… and can it be due the logo size in the Customizing/Layout/Header/Logo?
I have now 125×125 pixels.
What size of this logo do you recommend to use?Thanks. Sergey.
July 13, 2020 at 3:18 am #1361688DavidStaffCustomer SupportHi there,
its most likely the lazy loader. Can you exclude the logo images from the lazyloader ?
July 13, 2020 at 3:22 am #1361695ustarI put image link
https://u-star.cz/favicon_u-star_eshop_black_circle-2/
to the Lazy-load exclusions in the Autoptimize Settings.
Did i all correct?
How to check that it will help?July 13, 2020 at 3:32 am #1361705DavidStaffCustomer SupportCan you disable the lazy load option in Autoptimize. Then let me know
July 13, 2020 at 3:42 am #1361722ustarDone.
July 13, 2020 at 3:57 am #1361735DavidStaffCustomer SupportOk so that proves the logo lazy load is a problem.
Add this PHP Snippet to your site.add_filter( 'generate_mobile_header_logo_output', function( $output ) { if ( ! function_exists( 'generate_menu_plus_get_defaults' ) ) { return $output; } $settings = wp_parse_args( get_option( 'generate_menu_plus_settings', array() ), generate_menu_plus_get_defaults() ); return sprintf( '<div class="site-logo mobile-header-logo"> <a href="%1$s" title="%2$s" rel="home"> <img src="%3$s" class="no-lazy" alt="%4$s" /> </a> </div>', esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ), esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), esc_url( apply_filters( 'generate_mobile_header_logo', $settings['mobile_header_logo'] ) ), esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ) ); } );
Then in Autoptimize you can add the
no-lazy
class to exclude the logo.July 13, 2020 at 4:12 am #1361752ustarI added the code to the functions.php of the child theme and added no-lazy to the Lazy-load exclusions in the Autoptimize Settings. Am i correct?
July 13, 2020 at 4:20 am #1361760DavidStaffCustomer SupportYes, thats correct. And that code is working. And your CLS is scores is reporting
0
July 29, 2020 at 1:54 am #1380180ustarThank you very much, David!
Cool!
But after that images on pages with products listing are not showing.
I could give you a permition to the admin section if you need to check.Regards, Sergey.
July 29, 2020 at 2:01 am #1380197ustar* on mobile devices only. Sorry, i forgot to write this.
July 29, 2020 at 2:30 am #1380220ustarI removed no-lazy from Autoptimize, saved settings, added again and saved again.
Please, check from your side, is it ok now or not.Thanks.
Sergey.
July 29, 2020 at 5:15 am #1380374DavidStaffCustomer SupportLogo and images are all working for me 🙂
August 14, 2020 at 3:10 am #1402283ustarThanks, David!
August 14, 2020 at 5:08 am #1402432DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.