Virtue Child theme not overriding Parent Theme
-
First time here, and first time WP, so please bear with me. Have set up and activated a “Virtue” child theme.
The 3 files in my virtue-child directory are:
1. functions.php
<?php
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );
function enqueue_parent_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}
?>
2. style.css
/*
Theme Name: virtue-child
Theme URI:
Description: Child
Author: Virtue
Author URI:
Template: virtue
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: virtue-child
*/
@import url(“../virtue/style.css”);3. page-header.php
<div class=”page-header”>
<h1>
<?php //echo kadence_title();// ?>
</h1>
<?php global $post;
if(is_page()) {$bsub = get_post_meta( $post->ID, ‘_kad_subtitle’, true ); if($bsub != ”) echo ‘<p class=”subtitle”> ‘.__($bsub).’ </p>’; }
else if(is_category()) { echo ‘<p class=”subtitle”>’.__(category_description()).’ </p>’;}
?>
</div>When I make a change (as in commenting out the headline on page-header.php), the headline still appears. ( If I comment it out in the Parent file, it is doesn’t appear, as it shouldn’t.. but I’d like to work on the child theme…)
4. I have refreshed, cleared cache, and even checked in alternate browsers.
- The topic ‘Virtue Child theme not overriding Parent Theme’ is closed to new replies.