Debug changing page colours (Safari)
-
Hi, I'm using a script to give randomised page colours.
I have a problem with safari specifically- and only on one page
http://corneliabaltes.com/
The 'News' page takes maybe a minute to return a coloured background. This is a problem as all text elements and menus on the page are white.The script is:
<script> const colors = ["#FF7575", "#D69D00", "#FF5347", "#1BDA91", "#00ABF5", "#F38816"]; window.onload = () => { const colorToSet = colors[Math.floor(Math.random() * colors.length)]; document.querySelector("body").style.backgroundColor = colorToSet; };
I don't have the technical chops to even begin troubleshooting this. Any ideas?
I have already purged cache and also tried installing jetpack CDN...
Thanks!
-
Dear @joeclarkx
Great Website! 🌝
This CSS is responsible i believe:
#grid, .cover-region-desktop .cover-inner { /* background-color: #ffffff; */ }
Could you please try changing the Gridder's background colour to 'Clear'
Gridder > Set Background Color > Clear
Best wishes @joeclarkx and have a wonderful day, talk soon ✨
Richard
-
Hey
Thanks so much for the reply.
Actually the home page is intentionally set to white as an overlay.
The problem I have is the that only the News page is loading slowly. Very Slowly. I have started wondering if the problem might be the instagram embed. Thats the only thing that makes it different to any of the other pages...
-
Dear @joeclarkx
On Lay Theme's documentation page is a section they may help you with speeding up your website! Hope this helps 🌝
Best wishes and have a wonderful day 🌼
Richard
-
Hey Richard
Thats a great resource. I have already had a look at it and implemented what I could.
As its one particular page that I'm struggling with I'm inclined to think its some code that needs troubleshooting. I parked it for a bit, but I'll have another look. I'm guessing it may be the instagram embebd.
Best
Joe -
Thanks for the update Joe, best wishes 🌝
@joeclarkx
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it