Site logo

Archived topic

Child theme CSS & LCP

14 replies · Started by Chad on April 7, 2021

Viewing posts 1–15 of 15

Hi,

I have 2 questions. I've tried digging through support topics and have not found a solution that works for me.

1) I have set up a child theme. But when I try to place custom CSS in the style.css (instead of the WP Admin Customization CSS area) nothing works. I've tried using the GP child theme template and my own that worked with the previous theme. I've disabled all plugins and still nothing; turned them back on, nothing. But CSS works fine when in WP admin still.

2) My FCP and LCP time (and other CWV lab data) is super high on mobile for Google Page Speed test. With Google coming out with new rankings and Core Web Vitals, this is really important. I don't even think it is tied to containers or anything because even on a basic blog post page, it is just as bad as other more complex pages with images and containers and more blocks.

Do you have any suggestions? I'm using WP Rocket with WP Engine for hosting.

Thank you!

Hi there,

For #1: It's not working because it wasn't enqueued. And it wasn't enqueued because it's not the Active Theme.

Activate it so it applies.

For #2: WP Rocket doesn't seem to be set up properly yet.

When a site is optimized and/or cached, we shouldn't be able to see the origin stylesheets like these:
[redacted by request of user]

When the stylesheets are optimized, aggregated and cached, we should see only 1 file where all the CSS are placed.

Thanks Elvin!

1) That was really dumb on me. Sorry about that!

2) WP rocket isn't setup on our staging URL but is on our live URL, and I think it is working correctly: https://www.screencast.com/t/zjCKQleg

A new problem that has come up though is when we switch to the child theme (with CSS in external child theme style file) our site performance tanks. Going from A do D in GTMetrixs.

Any idea the cause of this?

Also please see these links....

Link redacted.

2) WP rocket isn’t setup on our staging URL but is on our live URL, and I think it is working correctly: https://www.screencast.com/t/zjCKQleg

A new problem that has come up though is when we switch to the child theme (with CSS in external child theme style file) our site performance tanks. Going from A do D in GTMetrixs.

Is this on staging or on live?

Can we stick with the staging first? So we're on the same page on what site we're tackling. Just apply what was done there to the live site once we're done. :)

See below...

Another update...

Hi again,

Another update...

I feel like things are speeding up and thing could have been due to x2 GA Tags firing, but not quite sure. But the good news is, it seems like pages are back to speeds of previous non-child theme.

But, there is still a big issue with slow LCP.

Our homepage is scoring pretty okay across the board on Google Page Speed (59) but LCP is 7.1 for
mobile. Desktop is all green for lab data except LCP, which is still yellow.

uBut what worries me more is that a simple blog post page, with no images or container or GP Blocks is still scoring low LCP. This is bad.

Any suggestions would be great:

hu

Hi there,

we're getting an 1020 error when trying to visit that URL - which i believe is a cloudflare firewall issue - can you check that issue out and let us know.

You will need to access from within USA.

Hi there,

Your Lab Data is actually looking really good on that page. The CLS and LCP seem to be coming from these elements: https://www.screencast.com/t/02p0XXHx

I'm not really seeing any obvious issues. The Origin Summary isn't great, but the current state of the page seems really good.

Thanks, Tom!

I noticed that but when I remove the drop cap (for example) the LCP just shows as the paragraph tag now.

Maybe I'm just obsessing over it too much!

That just means the area with the paragraph is the largest area for the browser to paint - not necessarily a bad thing :)

Got it, thanks Tom!

No problem!

This archived topic is closed to new replies.