Problem creating child theme
-
I’m trying to create a child theme for twenty fourteen, but it doesn’t seem to be working. To start, I just created a directory called twentyfourteen-child in my themes directory and added a style.css containing the following (only difference being mydomain.com has my actual domain name):
/* Theme Name: Twenty Fourteen Child Theme URI: http://mydomain.com/wp-content/themes/twentyfourteen-child/ Description: Twenty Fourteen Child Theme Author: My Name Author URI: http://mydomain.com Template: twentyfourteen 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: twentyfourteen-child */I created a functions.php as follows:
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { 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') ); }I activated the theme and would expect no difference given there are no customizations. But the site is mostly destroyed with none of the content visible in the sidebars and links moved to the top and bottom of the page. From what I understand, I don’t have to copy over any other files given any changes in my child theme will simply override existing files (with the exception of functions.php which will be added to the existing parent functions). Have I done something wrong here or do others have this problem too? Thanks!
The topic ‘Problem creating child theme’ is closed to new replies.
