I'm struggling to activate a child theme on my WordPress. I tried with this combination:
style.css
/*
Theme Name: test child
Template: parent-theme-directory-name
Version: 1.0.1
*/
functions.php
<?php
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
});
I get a success message: "New theme activated.", but the theme is not activated. Instead, it activates the first theme found in the directory listing.
Tried to activate this child on two different WP installations and two different themes. Running latest WP multisite with PHP 7.4. Also, all plugins are deactivated.
I could successfully "network enable" the theme and it's data is correctly displayed in themes.php