Site logo

Archived topic

Best performance results when adding custom CSS

3 replies · Started by Wim on April 12, 2021

Viewing posts 1–4 of 4

Hi team,

Can you help me choose the best approach (for performance) for adding custom CSS. Is that via:

• child theme with stylesheet.
• Simple CSS plugin which you mention in your docs.
• Code Snippets plugin which you mention in your docs to use for custom PHP, but can also be used for CSS.
• Via WordPress Customizer.

Reason for this question is mainly because you both mention the above plugins, but Code Snippets only for PHP. If it can also be used for CSS, why use Simple CSS plugin?

Kind regards.

Hi theres,

there is no real noticeable difference between any of the methods for small amounts of CSS as options 2,3 and 4 all inline the CSS in the Head of the site.

For large amounts of CSS ie. several hundreds of lines then its recommended to add these a child theme stylesheet as the browser can cache those files.

One main advantage of Simple CSS is the the Post editor Simple CSS meta box that allows you to add lines of CSS to just that specific post / page.

Thx David

You're welcome

This archived topic is closed to new replies.