您的style.css文件头绝对需要哪些主题细节?
我正在为个人使用开发我的第一个主题,所以我真的必须包括许可证、许可uri、作者、作者uri等内容。
WordPress文档只是举一个例子,但它们没有引用所需的内容。有人知道吗?
/*
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.
*/发布于 2014-05-12 04:18:34
快速测试表明,对于独立主题,实际上不需要在标题中出现任何内容。一个主题与一个完全空白的标题注册和加载只是很好,无论是前端和后端。
如果是子主题,则需要Template:行。
然而..。
除了主题的CSS样式信息外,style.css还以注释的形式提供了有关主题的详细信息。样式表必须以注释的形式提供有关主题的详细信息。不允许两个主题在评论标题中列出相同的细节,因为这将导致主题选择对话框中的问题。如果您通过复制现有主题来创建自己的主题,请确保首先更改此信息。http://codex.wordpress.org/Theme_Development#Stylesheet_指导方针
..。例如,如果您尝试了两次相同的技巧,则将所有内容保留为空白可能会带来麻烦。只要给出主题的最小细节,你应该对一个你没有发布的个人主题很好。说..。
/*
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
*/发布于 2016-08-31 19:44:56
什么是必需的,什么是最佳的做法是有区别的。如果您加载开发人员插件,它将加载的插件之一称为“主题检查器”。主题检查器用于您想要提交到Wordpress目录中的主题,但也可以检查您的私有、自定义主题。
如果你运行它,你就会看到Wordpress在一个好的主题中所缺少的所有东西。把所有这些都付诸实践是很好的。如果你的客户得到一个新的网页设计师,或者如果你想分享主题,它将是好的,有更多的元信息在那里。
https://wordpress.stackexchange.com/questions/144099
复制相似问题