Updating Child Theme Templates Doesn't Update Live Website
-
Hi,
I’m using a child theme. I have two different issues.
ISSUE 1:
When I update the stylesheet of the child theme, my website updates flawlessly.
When I update other template files in my child theme, my website does NOT update.
Per the instructions on this website, I copied the specific template files that I wanted to edit from the parent theme folder to my child theme folder and edited them. NONE of the edits work. If I go to the parent theme template and make the same edits, the live website updates perfectly. For some reason, the website doesn’t care that I have child themes.
Why is it that child templates do NOT update my website, but the parent templates do? Are you supposed to do something OTHER than simply copy them from the parent folder to the child folder?
ISSUE 2:
When I add code to the child functions.php, it works on the live site, but some things DO NOT? I have to add SOME codes to the parent functions.php for them to work, which doesn’t make any sense. Here’s an example:
THIS CODE WORKS WHEN ADDED TO MY CHILD FUNCTIONS.PHP:
add_post_type_support( ‘grfwp-review’, ‘post-formats’, 11 );
add_filter(‘post_class’, ‘reviews_post_class’);
function reviews_post_class($classes) {
if ( ‘grfwp-review’ == get_post_type() ) {
$classes[] .= ‘post’;
}
return $classes;
}BUT ODDLY, THIS CODE DOES NOT WORK WHEN ADDED TO MY CHILD FUNCTIONS.PHP, BUT WORKS IN THE PARENT??:
function custom_excerpt_length( $length ) {
return 35;
}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );
- The topic ‘Updating Child Theme Templates Doesn't Update Live Website’ is closed to new replies.