How can I make new .css file in child theme override styles in child theme’s style.css

You can enqueue your own stylesheet by adding this to your child theme’s functions.php file: function wpa_custom_css(){ wp_enqueue_style( ‘wpa_custom’, get_stylesheet_directory_uri() . ‘/responsive.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpa_custom_css’, 999 ); This will load the file responsive.css located in your child theme directory. The priority is set very low (999) so it is more likely to appear … Read more

I created a child theme and it doesn’t work for some of the css files

You are calling your css files with wrong function like in following line of your code wp_enqueue_style( ‘parent-style’, get_directory_directory_uri() . ‘style.css’ ); You are using get_directory_directory_uri() function to call files which is not event a function in wordpress. Files must be called with one of the following two functions get_stylesheeet_directory_uri() : This function will search … Read more

How to override filter in child theme?

I do not see you actually calling child_remove_parent_function() in your code. Another issue to be aware of is timing. It is counter–intuitive, but functions.php files are loaded in order of child first, parent second. Overall you need to ensure two things: code works at all it is called at the appropriate moment, after parent theme … Read more

How to override the Parent theme Function into child themes functions.php

Check the parent theme’s functions.php. If properly written to support child themes, each of these functions should be wrapped in a conditional as follows: if ( ! function_exists( ‘theme_setup’ ) ) : function theme_setup() { // Parent Theme Setup Function Code } endif; add_action( ‘after_theme_setup’, ‘theme_setup’ ); What this does is when the parent theme’s … Read more

How to “remove” file from parent theme

The child theme could just delete the parent theme file if it exists (via child theme functions.php). eg. $template = get_template_directory().’/woocommerce.php’; if (file_exists($template)) {unlink($template);} That would continue to override it if it came to exist again (ie. after a parent theme update.) If you aren’t going to update the parent theme just delete it’s woocommerce.php … Read more