Overriding parent theme files
-
Hi,
How can I override other files under subfolders within the parent theme?
I can’t seem to override files within the theme subfolders even though I’ve added the same subfolder path under the child theme, for example files under inc folder.I have the default child theme code in functions.php:
function my_theme_enqueue_styles() { $parent_style = 'parent-style'; 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' );
What else is missing?
Thanks
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Overriding parent theme files’ is closed to new replies.