错误的关键部分是:
主题缺少样式。css样式表。
WordPress文档打开Main Stylesheet 表示:
为了让WordPress将主题模板文件集识别为有效的主题,样式。css文件需要位于主题的根目录中,而不是子目录。
我建议您解压缩主题并查找style.css
. 如果文件在那里,打开它;应该有一些类似于以下内容的注释行:
/*
Theme Name: Twenty Seventeen
Theme URI: https://wordpress.org/themes/twentyseventeen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Seventeen brings your site to life with immersive featured images and subtle animations. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentyseventeen
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you\'ve learned with others.
*/
以下字段应位于每个主样式表中:
Theme Name
,
Author
,
Description
,
Version
,
License
,
License URI
和
Text Domain
.如果上述任何字段缺失,我强烈建议联系主题提供商。
如果您是主题的所有者或作者,请确保包括所提到的行,并包括style.css
在将存档的主题上载到WordPress安装之前,请在主题的根目录中创建一个文件。
此外,请确保在此处阅读有关主要样式表的更多信息:https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/