- This topic has 18 replies, 7 voices, and was last updated 2 years, 9 months ago by
David.
-
AuthorPosts
-
June 28, 2021 at 7:11 pm #1838083
Eric
Hi, I’m trying to use the beta WP rocket feature described here: https://docs.wp-rocket.me/article/1529-remove-unused-css
Unfortunately, it seems to break the GP hamburger menu. They give a few options for excluding the css including css filename, ID or class.
Could you help me identify which files or classes to include to keep the menu functioning? I’ve tried using classes, but I’m unable to get it to remain functional. Thanks so much!
June 28, 2021 at 9:05 pm #1838119Elvin
StaffCustomer SupportHi Eric,
Unused CSS file or lines are normally indicated in Google PSI. It’s included on the report.
Have you checked if there’s actually an unused CSS? Can you link us to the site you’re working on to check? (without removing unused CSS settings on WP Rocket)
June 28, 2021 at 10:56 pm #1838180Eric
I think you are misunderstanding my question. I’m not looking for the css lines or files that aren’t being used.
I’m looking for the files or css classes that contain the hamburger menu for the GP theme, so that this wp rocket feature continues to include it, and doesn’t falsely mark it as “unused”.
June 29, 2021 at 12:07 am #1838206Elvin
StaffCustomer SupportI’m looking for the files or css classes that contain the hamburger menu for the GP theme, so that this wp rocket feature continues to include it, and doesn’t falsely mark it as “unused”.
Ah right.
Here’s the normal structure. https://share.getcloudapp.com/o0ueGrlP
button.menu-toggle
is the main ancestor element selector.span.gp-icon.icon-menu-bars
is the parent class selector of the svg element. Not exactly sure what WP Rocket needs.Also, if the menu itself isn’t working as it should then perhaps the scripts involved are affected as well.
June 29, 2021 at 1:00 am #1838258Eric
I tried this, and the menu functionality is still not working. Could you perhaps give me the style files that deal with this menu?
I tried turning off all of my javascript optimizations as well. Thanks.
June 29, 2021 at 1:02 am #1838259Eric
One other thought, it might be that the styles for the offscreen menu are being removed. What classes or files are used for the menu which appears when the hamburger menu icon is pressed?
Thanks again.
June 29, 2021 at 1:22 am #1838277Elvin
StaffCustomer SupportFrom GP premium, it’s these files:
JS – https://share.getcloudapp.com/o0ueXoWw
CSS – https://share.getcloudapp.com/Kou410vdFrom GP theme, it’s these ones:
JS – https://share.getcloudapp.com/2Nuq7JdXFor the CSS, it’s a mix from main, style and mobile.css found here – https://github.com/tomusborne/generatepress/tree/master/assets/css
June 29, 2021 at 1:23 am #1838279Eric
I think I got it to work. I used this catchall that seems to be stopping WP rocket from removing any GP css with this feature.
/wp-content/plugins/gp-premium/(.*).
And my “remove unused css” notifications in google page speed insights are gone!
June 29, 2021 at 1:37 am #1838300Elvin
StaffCustomer SupportI believe this is sorted out? Let us know if you need further help. 🙂
July 1, 2021 at 11:01 pm #1841749Abhishek
Hi Eric,
Can you please describe what you did there.
Whenever i am trying to remove unused css with wprocket.
it is saying – We are processing the CSS on your site. This may take several minutes to complete.
and its stuck there loading.
Awaiting your reply.
ThanksJuly 1, 2021 at 11:31 pm #1841760Eric
Sorry, I only gave a segment of the url. Bad copy/paste.
https://emmassexstore.com/wp-content/plugins/gp-premium/(.*).css
Add this to your list of exclusions (with your domain instead of mine) and it should exclude all GP css files from being removed. That was my experience at least, not sure if it will work for you.
July 1, 2021 at 11:32 pm #1841761Elvin
StaffCustomer SupportHi Abhishek,
I believe Eric used WP Rocket’s CSS safe list text field to add
/wp-content/plugins/gp-premium/(.*)
.If it’s not working on your end you may have to ask WP Rocket’s support for this.
[Edit]
@Eric Thanks for sharing! 😀October 1, 2021 at 10:29 am #1949695Tim
I also experience this issue where the hamburger menu won’t work properly when having Remove Unused CSS activated. I only experience issues with this on mobile.
I have tried adding both
/wp-content/plugins/gp-premium/(.*)
and/wp-content/plugins/gp-premium/(.*).css
to the exclusion list without it doing any difference.EDIT: I also tried adding this as an exclusion:
/wp-content/themes/generatepress/assets/css/(.*).css
Does anyone have anything to add to this thread maybe? 🙂
Enabling this option boosts my mobile pagescore from 38 to 68 and the only issue is with the mobile hamburger menu so Id really like to have it on!
October 2, 2021 at 4:55 am #1950178David
StaffCustomer SupportHi there,
try excluding the
main.min.css
file.But as Elvin suggested you may find WP Rockets support more able to assist, they know the GP Theme very well 🙂
October 2, 2021 at 5:46 am #1950216Tim
Already did that in the catch-all, but tried now adding it seperately as well, with no luck.
Also tried with the full path using https://domain.tld/
I guess I’ll check with their support team.
-
AuthorPosts
- You must be logged in to reply to this topic.