Suggestion to provide child theme starter files and instructions

By UUA Web Team
November 9, 2015, 1:01 pm EST

Many WordPress themes provide a very useful item: the basic files and instructions necessary for you to install a child theme for the main parent theme. Often, they are provided in a ZIP file that can be uploaded and installed directly on your WordPress site. Might I suggest that, since you appear to recommend the use of a child theme (and I agree), you provide some instructions and some starter files to use to set this up? I recognize that there are instructions on wordpress.org, but they are not as easy to follow as they could be. As I understand it, the recommendation is that there are four files needed for such a child theme to exist in its main directory/folder: style.css, which should be of the form: /*
Theme Name: UUA Congregations Child
Description: A child of the custom theme for Unitarian Universalist Congregations
Version: 1.0.0
Author: Your Name
Author URI: http://yourhostname/
Template: uua-congregation
*/ functions.php, which should contain something like this: <?php
// Add your custom functions here // Queue parent style followed by child/customized style
add_action( 'wp_enqueue_scripts', 'uua_congregation_enqueue_child_styles', 99); function uua_congregation_enqueue_child_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_dequeue_style('uua_congregation-style');
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style'));
} ?> Note: It's not clear to me whether you need the above wp_dequeue_style call. readme.txt, containing instructions on how to set things up -- something along the lines of: Install this like any other theme and activate it via the WordPress dashboard. You should have the uua-congregation theme side-by-side with this child theme when attempting to enable this one. screenshot.png, a screenshot of the way the theme should look. At least, that's what I used to set up my child theme. In my experience, while the style.css file is easy to set up, it's not so easy to figure out what to put in the functions.php file. Thanks for listening!