首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >需要帮助安装Hoffman儿童主题

需要帮助安装Hoffman儿童主题
EN

WordPress Development用户
提问于 2016-12-13 17:33:44
回答 1查看 125关注 0票数 0

有人能帮我加载“霍夫曼”的儿童主题吗?我已经看到了很多关于其他主题的类似主题的问题,这似乎是很多像我这样的WP新手都在努力解决的共同问题。

我可以完美地加载父主题,没有任何问题。但我在为两件事而挣扎。

  1. 在子主题的style.css顶部应该有哪些细节?目前,我有:

代码语言:javascript
复制
/*---------------------------------------------------------------------------------
Theme Name: Hoffman Child
Text Domain: hoffman child
Theme URI: http://www.andersnoren.se/teman/hoffman-wordpress-theme/
Version: 1.17
Description: Hoffman is a beautifully minimal, responsive and retina-ready theme for bloggers. It features a social icon menu, Jetpack support for infinite scroll, five custom widgets, two page templates, editor styling, translation-ready code, custom accent color support, custom background support, support for the gallery post format and much more. Included translations: Swedish/svenska. Demo: http://www.andersnoren.se/themes/hoffman/
Tags: blog, one-column, custom-colors, custom-menu, editor-style, featured-images, footer-widgets, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
Author: Anders Norén
Author URI: http://www.andersnoren.se
License: GNU General Public License version 2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: hoffman;

All files, unless otherwise stated, are released under the GNU General Public License
version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html)
-----------------------------------------------------------------------------------*/

@import url("../hoffman/style.css");

我尝试了几个不同的版本,我没有修改文本域。

  1. 第二个问题是,当子主题被压缩并且我试图上传它时,它似乎找不到父主题,即使父主题已经成功加载并且在WP中工作得很好。上传hoffman. the时,我收到的报告是这样的:

从上传的文件中安装主题:hoffman.…解压缩包…安装主题…此主题需要父主题。检查它是否已安装…准备安装Hoffman 1.17…从https://downloads.wordpress.org/theme/hoffman.1.17.zip…下载安装包解压缩包…安装主题…目标文件夹已经存在。/var/www/vhosts/smokeandglass.co.uk/httpdocs/wordpress/wp-content/themes/hoffman/主题安装失败。成功安装了主题。

完全迷茫了!非常感谢您的提前帮助。

EN

回答 1

WordPress Development用户

发布于 2016-12-14 00:17:08

正如jdm2112所建议的,WP法典有一个非常详细的解释。根据你的问题,有几点看法:

  1. 文本域不应该包含空格
  2. “模板”值应该与父主题的目录名称相同(选中它)。
  3. 确保子主题目录名与父主题不同,约定称为yourparenttheme-child,其中您的父主题是父主题的目录名。
  4. 为什么要把文件夹拉链?只需将目录上传到/wp-content/themes/
  5. 不要忘记添加functions.php文件
  6. 您应该先安装父主题,然后安装子主题。

这是子主题(WP文档)的标准标题:

代码语言:javascript
复制
/*
 Theme Name:   Twenty Fifteen Child
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/
票数 0
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://wordpress.stackexchange.com/questions/249147

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档