首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Style.css文件头需要哪些详细信息?

Style.css文件头需要哪些详细信息?
EN

WordPress Development用户
提问于 2014-05-12 03:25:51
回答 2查看 10.9K关注 0票数 3

您的style.css文件头绝对需要哪些主题细节?

我正在为个人使用开发我的第一个主题,所以我真的必须包括许可证、许可uri、作者、作者uri等内容。

WordPress文档只是举一个例子,但它们没有引用所需的内容。有人知道吗?

代码语言:javascript
复制
/*
Theme Name: Twenty Thirteen
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen

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.
*/
EN

回答 2

WordPress Development用户

回答已采纳

发布于 2014-05-12 04:18:34

快速测试表明,对于独立主题,实际上不需要在标题中出现任何内容。一个主题与一个完全空白的标题注册和加载只是很好,无论是前端和后端。

如果是子主题,则需要Template:行。

然而..。

除了主题的CSS样式信息外,style.css还以注释的形式提供了有关主题的详细信息。样式表必须以注释的形式提供有关主题的详细信息。不允许两个主题在评论标题中列出相同的细节,因为这将导致主题选择对话框中的问题。如果您通过复制现有主题来创建自己的主题,请确保首先更改此信息。http://codex.wordpress.org/Theme_Development#Stylesheet_指导方针

..。例如,如果您尝试了两次相同的技巧,则将所有内容保留为空白可能会带来麻烦。只要给出主题的最小细节,你应该对一个你没有发布的个人主题很好。说..。

代码语言:javascript
复制
/*
Theme Name: Twenty Thirteen
Author: the WordPress team
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
*/
票数 2
EN

WordPress Development用户

发布于 2016-08-31 19:44:56

什么是必需的,什么是最佳的做法是有区别的。如果您加载开发人员插件,它将加载的插件之一称为“主题检查器”。主题检查器用于您想要提交到Wordpress目录中的主题,但也可以检查您的私有、自定义主题。

如果你运行它,你就会看到Wordpress在一个好的主题中所缺少的所有东西。把所有这些都付诸实践是很好的。如果你的客户得到一个新的网页设计师,或者如果你想分享主题,它将是好的,有更多的元信息在那里。

票数 0
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

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

复制
相关文章

相似问题

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