As the amount of custom CSS has been steadily growing, it felt more and more appropriate to put them in a child theme instead.

The process is surprisingly easy, and weird, at the same time.

Basically, all I needed to do is to follow the official tutorial, and create a CSS with boilerplate comments (which doubles as metadata processed by WordPress), and a PHP file with boilerplate code to load that said CSS. Then I copy the real CSS after the comments.

Switching to the new child theme ended up with two minor problems:

  1. the default title background image (of Kahuna, that is) appeared again. It shouldn’t, but maybe Kahuna is making weird assumption about that. All other options are inherited from my Kahuna setting as expected, however.
  2. the CSS is loaded at a different place from the old “custom CSS” text box. Therefore, its priority was changed, and some of the old stuff no longer worked and needed an extra !important to get working.

Overall, the process is mostly smooth, but the existence of these minor problems also means it’s more shaky than I thought. So maybe I need to double check if everything works as expected.

The child theme now resides at Github.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.