2014年6月29日

wordpress主题在后台显示详细资料介绍的关联文件

在wordpress后台显示主题的介绍,主题根目录下需包含这三个文件:

1.style.css

以Twenty Thirteen为例,css包含这样头部:

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

2.index.php

这是wordpress首页的模版,只要这个文件存在,一开始内容空白也无碍事。

3.screenshot.png

wordpress主题在后台显示的介绍图,尺寸大小无特殊限制。

参考资料:

1.wordpress官网主题制作说明文档:

http://codex.wordpress.org/Theme_Development

2.wordpress花园的视频介绍:wordpress模板制作教程:2基础样式文件的创建