Transfer changes from CSS to php

Hello,

I was able to make changes through CSS after searching through the forum. I would like to transfer the changes from CSS to php in order to improve my site’s page load speed. Could I send the CSS code I made in a private note and ask how it can be implemented in php on my child theme?

thanks.

Hello @ayham,

Thanks for asking. :slight_smile:

I don’t think transferring modified CSS will make much of a difference to page load time. On the other hand I would suggest you to add CSS codes in child theme style.css file. As a webmaster our job is to also reduce page weight as its by far the most important factor in page load time. We do that by not adding unnecessary contents, codes, making sure the layout and code is clean etc.

Please note that there are bunch of other ways that can be used to significantly improve page load time like taking advantage of good quality hosting, caching plugin, CDN, compressing image file size without sacrificing quality etc. I would highly recommend you to refer our performance improvement guide to optimize page load time:

Thanks.

Thanks for the reply.

So in theory adding the changed I made in global CSS to style.css is better?

In theory, yes. But, theme styles overrides must be placed in the Global CSS because of CSS precedence. You can place your own styles in style.css.

Moving CSS to PHP would require custom development which is outside the scope of our support. We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you.

Thank you for your understanding.