How to Use Multiple CSS Stylesheets with a WordPress Child Theme

Why Multiple Stylesheets?

It’s better to have separate stylesheets for different areas of styling in order to make the codebase more maintainable and easier to manage. For example, if you use a particular plugin to display tables and later you start using a different plugin to do this, then you will have to find which CSS was used for this. If you have a separate stylesheet for each plugin then you only need to create a new stylesheet for the new plugin and stop including the stylesheet for the previous plugin. If you change back to the other plugin later then you can easily re-include the other stylesheet.

Here’s the code I use to load multiple stylesheets for my child theme:

Let me know if you have any improvements or feedback in the comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *