Using Child Themes - mixatheme/Wireframe GitHub Wiki

NOTE: THIS WIKI PAGE WAS WRITTEN WAY BACK IN 2015 FOR WIREFRAME ALPHA. WE ARE CURRENTLY IN THE PROCESS OF UPDATING THESE DOCS HOPEFULLY FOR A JUNE 2017 RELEASE. THANK YOU FOR YOUR PATIENCE.

Child themes only require 1 file to activate successfully: the style.css file. Optionally, if you need to overload any Parent theme functions, you can create a function.php for your Child theme. We highly recommend using Child themes. When you activate and develop with Child themes, your modifications will not be overwritten when the Parent theme gets updated.

Contents

style.css

Declares the Child theme manifest and defines the Parent theme name.

You must declare your parent theme's Template name.

Template: wireframe

Example of a typical Wireframe Child Theme style.css docblock manifest.

/*!
Theme Name:  Wireframe Child
Version:     1.0.0
Author:      Your Name
Description: Your child theme description.
Tags:        example-tag
Theme URI:   https://github.com/mixatheme/Wireframe
Author URI:  https://mixatheme.com/
Text Domain: wireframe-child
Template:    wireframe
License:     GPL-3.0+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

functions.php

Example how-to enqueue Parent theme styles and Child theme styles.

function wireframe_child_enqueue() {

	// Default handles.
	$parent_style = 'parent-style';
	$child_style  = 'wireframe-child';

	// Enqueue the parent styles.
	wp_enqueue_style(
		$parent_style,
		get_template_directory_uri() . '/style.css'
	);

	// Enqueue the child styles.
	wp_enqueue_style(
		$child_style,
		get_stylesheet_directory_uri() . '/style.css',
		array( $parent_style )
	);
}

Filters

Many of Wireframe's functions can be hooked with Filters. Click here to reference the current up-to-date list of Filters available to Child themes. View Filters