Skip to content

Child Themes

Nick Haskins edited this page Nov 28, 2013 · 3 revisions

Theory

Child themes follow every standard that Wordpress offers. There's nothing different at all, with the exception of LESS. When you enqueue your style, enqueue it as a .less file. All your CSS/LESS will go into this less file. This is then compiled by Soren, and cached. It's compiled when the style.less file is saved, or when using the Theme Customizer and saving settings there.

Enqueue LESS

wp_enqueue_style('yourchildtheme-style', SOREN_CHILD_URL.'/style.less', '1.0', true);

Overriding Child Theme CSS

The best way to override child theme CSS is through the Custom CSS box located under Appearance, in Wordpress admin. This area is safe from child theme updates.

Overriding Child Theme Templates

Child theme templates can easily be overridden with the [https://github.com/bearded-avenger/child-customizer](Child Customizer) Plugin. Simply copy the template from the child theme, to the templatesgohere directory in the plugin, and your changes will be safe from child theme updates. Try to avoid directly changing the child theme templates, as they will be overridden with updates.

Clone this wiki locally