The main takeaway from that code you linked to is using the category_template
filter to modify the template that WordPress will use when a user is viewing a child category of the lumber category. I put this together for you as it’s a bit simpler when you’re only working with the one template:
// add this filter to your themes functions.php file
add_filter('category_template', 'yourprefix_use_lumber_category_template_for_child_categories');
function yourprefix_use_lumber_category_template_for_child_categories( $template ) {
// get the current category object
$category = get_queried_object();
// if current category has lumber category(assuming lumber category id == 7) as its parent...
if( $category->parent == 7 ) {
// ...then find the named category-lumber.php template in theme, and replace whatever default $template is found by WordPress...
$template = locate_template('category-lumber.php');
// ...finally return the lumber category template file
return $template;
}
else {
// ...the current category has no lumber category as parent, so just return default $template file found by WordPress
return $template;
}
}