站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
Theme Development
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
===主题样式表=== In addition to CSS style information for your theme, the stylesheet, <tt>style.css</tt> '''''must''''' provide details about the Theme in the form of comments. '''''No two Themes are allowed to have the same details''''' listed in their comment headers, as this will lead to problems in the [[WordPress:Administration_Panels#Design_-_Change_the_Look_of_your_Blog|Theme selection dialog]]. If you make your own Theme by copying an existing one, make sure you change this information first. 除了提供你的主题的CSS样式信息外,样式表,<tt>style.css</tt> '''''必须'''''提供评论形式的主题的详细信息。评论标题上不能列出'''''两个主题同样的详细信息''''',因为这会引起[[WordPress:Administration_Panels#Design_-_Change_the_Look_of_your_Blog|主题选择对话]]的错误。如果你通过复制一个现存的主题来制作你自己的主题,首先要确定你已经更改了这个信息。 The following is an example of the first few lines of the stylesheet, called the style sheet header, for the Theme "Rose": 下面是主题的"玫瑰"的样式表前几行的例子,称作样式表标题: <pre>/* Theme Name: Rose Theme URI: the-theme's-homepage Description: a-brief-description Author: your-name Author URI: your-URI Template: use-this-to-define-a-parent-theme--optional Version: a-number--optional . <pre>/* 主题名: 玫瑰 主题 URI: 主题的主页 描述: 主要的简述 作者:你的姓名 作者URI: 你的-URI 模板: 使用-这个-来-定义-一个-母-主题—任意的 版本: 一个-数字—随意的。 General comments/License Statement if any. 如果有许可的话,一般的评论/许可声明。 */</pre> */</pre> The simplest Theme includes only a <tt>style.css</tt> file, plus images, if any. To create such a Theme, you must specify a set of templates to ''inherit'' for use with the Theme by editing the <tt>Template:</tt> line in the <tt>style.css</tt> header comments. For example, if you wanted the Theme "Rose" to inherit the templates from another Theme called "test", you would include <tt>Template: test</tt> in the comments at the beginning of Rose's <tt>style.css</tt>. Now "test" is the parent Theme for "Rose", which still consists only of a <tt>style.css</tt> file and the concomitant images, all located in the directory <tt>wp-content/themes/Rose</tt>. ''(Note that specifying a parent Theme will inherit ''all'' of the template files from that Theme — meaning that any template files in the child Theme's directory will be ignored.)'' 如果存在最简单的主题,这种主题只包括一个<tt>style.css</tt>文件和图像(如果有图像)。要创建这样的一个主题,你必须通过在<tt>style.css</tt>标题评论中编辑<tt>Template:</tt>行,来规定一套模板来''继承''使用主题。例如,如果你想要"Rose"主题来继承其它的一个称作"测试"的主题的模板,你就会将评论中的<tt>Template: test</tt>放入Rose的tt>style.css</tt>开端。现在"test" 是"Rose"的母主题,只包含有一个<tt>style.css</tt>文件和一个相关的图像,都在<tt>wp-content/themes/Rose</tt>目录中。''(注规定一个母主题会从主题&mdash中继承''所有的''主题文件;意思是子主题目录中的任何模板文件都会被忽视。)'' The comment header lines in <tt>style.css</tt> are required for WordPress to be able to identify a Theme and display it in the [[WordPress:Administration_Panels|Administration Panel]] under [[WordPress:Administration_Panels#Design_-_Change_the_Look_of_your_Blog|Design]] > [[WordPress:Administration_Panels#Themes|Themes]] as an available Theme option along with any other installed Themes. <tt>style.css</tt>中的评论标题行要求WordPress能够辨别一个主题并且将主题显示在[[WordPress:Administration_Panels#Design_-_Change_the_Look_of_your_Blog|设计]] > [[WordPress:Administration_Panels#Themes|主题]]下的[[WordPress:Administration_Panels|管理面板]]与其它安装好的主题一起,作为可选择的主题。 '''Note''' : ''When defining the parent Theme, in the <tt>Template:</tt> section of the comment header, you must use the name of the directory of the style. For example, to use as parent template the Default Wordpress Theme, don't write <tt>Template: WordPress Default</tt>, but <tt>Template: default</tt>, because default is the directory of this Theme.'' '''注''' : ''当在评论标题的<tt>Template:</tt>部分定义一个母主题的时候,你必须使用那个样式的目录名。例如,将默认的WordPress主题用作母主题,不要写成<tt>模板: WordPress 默认</tt>,要写成<tt>模板: 默认</tt>,因为默认是这个主题的目录。''
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)