If you are editing the child theme CSS then this line has nothing to do with that:
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css', [], THEME_VERSION, 'all');
get_template_directory_uri
always refers to the parent theme, get_stylesheet_directory_uri
always refers to the active theme, in this case the child theme.
Likewise these lines refer to the currently active theme, aka the child theme:
$theme = wp_get_theme();
define('THEME_VERSION', $theme->Version); //gets version written in your style.css
You need to verify that:
- the file you are editing’s URL changes when you modify it using browser dev tools, if it does not change then you should expect it to be cached until it does change
- that you are not using the parent themes version for the child themes stylesheet or vice versa
- that you are enqueing both, and that their names are clear to avoid confusion
- that the child theme uses
get_stylesheet_directory_uri
when enqueing, notget_template_directory_uri
Most people do not use the theme version to update the URL when the file changes as that requires modifying the theme version which is a manual and easily forgotten process. Instead using filemtime
or an MD5 hash of the stylesheet is more reliable.