Site logo

Archived topic

Page specific CSS

7 replies · Started by Espen on March 4, 2021

Viewing posts 1–8 of 8

Hi,

I'm creating some pages using GP and GenerateBlocks and on some pages, there is a lot of custom CSS. This is CSS that is not needed elsewhere on the site and so I would prefer not to add it to the child theme CSS file since then it will be loaded sitewide.

Is there a way to add CSS to a page so that is only loaded on that page?

Thanks!

-Espen

Thank you, David!

-Espen

You're welcome

Hi David, just a question about the possibility to use a Hook Element to add the styles to specific pages. Doing so, do the css will be minified and optimized by third party plugins like WP-Rocket or similar?

Hi there,

yes, if the plugin is set to combine/minify inline CSS.

Thank you David

You're welcome

This archived topic is closed to new replies.