Twentysixteen Child Theme Stylesheet Missing
-
Hi,
Just getting started (well, I started a couple years ago, got derailed by other projects, and am restarting now).
I want to make a child theme of twentysixteen. I followed the examples/instructions exactly I thought (https://codex.wordpress.org/Child_Themes), but it’s still telling me the stylesheet is missing. Here’s my style.css:
/*
Theme Name: Twenty Sixteen K2
Theme URI: http://x.x.x.x/twentysixteen-k2/
Description: Twenty Sixteen Child Theme for K2
Author: John Doe
Author URI: http://example.com
Template: twentysixteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-sixteen-k2
*/Here’s functions.php:
<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}
function theme_enqueue_styles() {
$parent_style = ‘parent-style’;
wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array( $parent_style )
);
}
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );?>
(yes, I have real #s in the theme uri, just felt weird posting them)
Obviously I haven’t made any changes or added any of my own styles yet. Just trying to get it up and running first.
One thing that isn’t clear is if “parent-syle” is static text I should be putting there or if they want me to put the name of the theme/style of twentysixteen. I tried both “parent-style” and “twenty-sixteen” and neither one worked.
Can someone help set me right?
Thanks,
Jeff
The topic ‘Twentysixteen Child Theme Stylesheet Missing’ is closed to new replies.