最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Child theme not activating despite success message

programmeradmin0浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论