Replies: 0
I am quite new to WordPress, so normally, run into some trouble with child theme.
I have created a child theme for twentyfourteen, and when I try to change the website by editing my child theme css file, it doesn’t work.
Here is the content of my css file:
[code language=”css’]
/*
Theme Name: Twenty Fourteen Child
Theme URI: http://saveourcure.org/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: Avril Wang
Author URI: http://saveourcure.org
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child
*/
/* =Theme customization starts here
————————————————————– */
.site {
background-color: #eee;
}
.site-content .entry-header {
background: #eee;
}
.entry-title {
font-size:42px;
}
[/code]
Here is the content of my php file
[code language=”php]
<?php
function my_theme_enqueue_styles() {
$parent_style = ‘parent-style’; // This is ‘twentyfourteen-style’ for the Twenty Fourteen theme.
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 ),
wp_get_theme()->get(‘Version’)
);
}
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
[/code]