Archived topic
CLS Mobile Header
9 replies · Started by steven on May 17, 2021
Hi,
site: https://sugardaddyguru.com
I'm having issues with the CLS on mobile header only. Score of 0.381.
I am not currently using lazy load AFAIK.
I am using cloudflare, cache enabler and shortpixel image optimizer.
Can you help?
Hi there,
I am using cloudflare, cache enabler and shortpixel image optimizer.
Can you disable these options to run another test?
Same issue. I'm always going to want to have those on anyway.
I notice this problem has occured frequently before and others were given some code to insert. I'd like the same , if possible.
If that is the solution can you tell me where to insert it though, as I have literally no clue. Not my forte.
Thanks.
Hi there,
Same issue. I’m always going to want to have those on anyway.
I notice this problem has occured frequently before and others were given some code to insert. I’d like the same , if possible.
If that is the solution can you tell me where to insert it though, as I have literally no clue. Not my forte.
Thanks.
We ask to disable things for debugging purposes. Having these enable lets us know where the issue comes from.
This way, we can determine the proper fix and if the issue itself is within the scope of the theme's support.
Cloudflare and Shortpixel's CDNs aren't exactly fast 100% of the time.
Plus, it's possible that the 2 plugins conflict and/or makes things work because of the nature of how they work.
Shortpixel serves the images through its CDN servers but Cloudflare does that as well.
I disabled the plugins. Cleared cache. Ran the test again. Same issue.
I am not sure what you are asking me to do? Are you asking me to disable them permanently?
Once again, the site : https://sugardaddyguru.com
I am following the guidelines per this article, which recommends using both cloudflare and Shortpixel:
https://woorkup.com/speed-up-wordpress
The guy who wrote it has been using generatepress for a long time and has 100% on the page experience score, so it does look like he knows what he is talking about.
Further, I note that on the first page of this support forum alone you have 2 issues with CLS. I'd really not have to do it, but I can find lots more recent examples of CLS issues on this forum, which points to a more fundamental problem with the theme, rather than isolated incidents.
I'd just like to get this fixed and move on. Your theme scores wonderfully on pagespeed insights and is the best theme I've ever found, but there does seem to be a recurring issue with the mobile logo and CLS.
Just tell me what I need to do, and I will do it.
Thanks.
Hi there,
2 options:
1. Enable the Mobile Header in Customizer > Layout > Header - with that enabled you will see the option to add a mobile logo.
2. See this reply from Tom:
https://generatepress.com/forums/topic/logo-does-not-have-explicit-width-and-height/#post-1762272
Hello David,
Thanks.
Re the reply from Tom - I'd like to try that. But there are no instructions on what to do with that code.
Where do I put it? I am not a developper.
That code is PHP - this article explains how to add it:
https://docs.generatepress.com/article/adding-php/
TLDR: If you're using a Child Theme, then add the code to the Child Theme functions.php. If not - the install the Code Snippets plugin: https://wordpress.org/plugins/code-snippets/ and create a new snippet to add the code in.
David my man you are a genius - it worked! I'm getting nearly 100 in page speed insights now.
I will resolve this issue. Thanks so much.
Glad to be of help - and great to hear about those PSI scores :)