Child theme not overriding parent theme
-
It’s my first time working from a child-theme so apologies in advance if I’m being slow on the uptake!
My child theme isn’t overriding my parent theme.
Here is my functions.php
<?php
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
function my_theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}
function load_fonts() {
wp_register_style(‘et-googleFonts’, ‘https://fonts.googleapis.com/css?family=Open+Sans’);
wp_enqueue_style( ‘et-googleFonts’);
}
add_action(‘wp_print_styles’, ‘load_fonts’);And here is my style.css
/*
Theme Name: Twenty Eleven Child
Theme URI: https://www.audioplus.co.uk
Description: Twenty Eleven Child Theme
Author: Ella
Author URI: https://www.ellacopter.com
Template: twentyeleven
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-eleven-child
*//////*Site Title*//////
h1#site-title img{
width:350px;
height:178px;
}h1#site-title {
margin-right: 270px;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0.0em;
}h2#site-description {
margin-bottom: 0.0em;
}/////*Font*//////
#body {
font-family: ‘Open Sans’ , sans-serif;
font-size: 14px;
color: #000000;}
/////*Navigation*//////
#access {
background: #e2e2e2;
border-bottom: 1px solid #000000;}
Any help would be great. Thanks!
- The topic ‘Child theme not overriding parent theme’ is closed to new replies.