码迷,mamicode.com
首页 > 其他好文 > 详细

WordPress主题开发:最简单的主题构成

时间:2017-02-01 23:21:41      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:官方   资源   class   开发   this   har   css   主题   others   

在最简单的情况下,一个WordPress主题由两个文件构成:

index.php ------------------主模版

style.css -------------------主样式表

而且style.css要加上主题信息标记

(注意的是两个不同的主题是不允许拥有相同的表述 , 这样会导致主题选择出错的。

/*
Theme Name: 主题名称
Theme URI: 主题介绍地址(如果你的主题上传到wordpress官方资源处适用)
Author: 主题的作者
Author URI: 主题作者的网址
Description: 主题的描述
Version: 主题的版本
License: GNU General Public License v2 or later【版权说明】
License URI: http://www.gnu.org/licenses/gpl-2.0.html 【版权说明的网址】
Tags: 主题的标签,如果你的主题上传到官方指定处,通过此标签可以被筛选出
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.
*/

WordPress主题开发:最简单的主题构成

标签:官方   资源   class   开发   this   har   css   主题   others   

原文地址:http://www.cnblogs.com/tinyphp/p/6341501.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!