Change Load CSS Asynchronously sample URLs

The Critical Path CSS is generated by WP Rocket for the homepage and each post type and taxonomy archive page. We select the last post for each type of content.

The last post may not be accessible in some cases, or it may not be representative of the overall page structure. Either the Critical Path CSS will not be created, or FOUCs will appear on the vast majority of the same type of content.

Helper plugin

๐Ÿ“ Manual code edit required before use!
You must edit the line beginning with $items[] to reflect what items need to be replaced (line 28 and 29).
For the Product post type, the replacement sample URL should look like $items['product']['url'] = 'https://domain.ext/slug/';

๐Ÿ“ฅ Download (.zip): WP Rocket | Change Load CSS Asynchronously Sample URLs
Developers: You can find the code for this plugin on GitHub.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.