站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Site Architecture 1.5
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== 核心结构 == The core structure of a WordPress site represents the main containers which hold the page's content. The core structure of a WordPress site features, at a minimum, are: WordPress站点的核心结构相当于是承载网页内容的一个大容器。WordPress站点功能的核心结构,至少是: * Header * Sidebar/Menu * Content * Footer * 标题 * 边框/菜单 * 内容 * 页底文字 These are the main containers in which the most important parts of the page are "contained". Remember, the core structure is like building blocks. They are dependent upon each other. If you change one, you have to change the others. 有一个主要的容易"包含"网页大多数重要的部分。记住,核心部分就像是积木。每个部分都是互相依赖的。如果你更改了这个部分,你就要更改那个部分。 '''Classic Theme''' '''经典主题''' <pre><body> <div id="rap"> <h1 id="header"></h1> <div id="content"></div> <div id="menu"></div> <p class="credit"></p> </div> </body></pre> <pre><body> <div id="rap"> <h1 id="header"></h1> <div id="content"></div> <div id="menu"></div> <p class="credit"></p> </div> </body></pre> '''Default Theme''' '''默认主题''' <pre><body> <div id="page"> <div id="header"></div> <div id="content" class="narrowcolumn"></div> <div id="sidebar"></div> <div id="footer"></div> </div><!-- end page --> </body></pre> <pre><body> <div id="page"> <div id="header"></div> <div id="content" class="narrowcolumn"></div> <div id="sidebar"></div> <div id="footer"></div> </div><!-- end page --> </body></pre> While one calls their sidebar <tt>sidebar</tt> and the other <tt>menu</tt>, the main difference between the two Theme's core structures is the use of the header and footer. For the Classic Theme, the header is in an <tt>h1</tt> tag and the footer is in a paragraph tag. In the Default Theme, the header is in a <tt>div</tt> called <tt>header</tt> and the footer is in the <tt>footer div</tt>. 当一个人调用边框<tt>边框</tt>,而另一个人调用<tt>菜单</tt>的时候,这两个主题的核心结构的区别在于标头和页底文字的使用方面。对于经典主题而言,标头是个<tt>h1</tt>标签而页底文字是个段落标签。在默认主题中,标头是在<tt>div</tt>中,称为<tt>标头</tt>而页底文字是在<tt>页底文字 div</tt>中。 Both Themes feature a container that encompasses or "wraps" itself around the entire page. This wrapping container allows for more definitive control over the overall structure, often used in combination with the <tt>body</tt> tag. In different WordPress Themes, these are also found by these names: 两个主题都有一个容器(空间),用整个网页包围"包裹"着。这个包装用的容器,能够使你更能够控制整个结构,而且通常是与<tt>主体</tt>标签一起使用。在不同的WordPress主题中,通过这些名字,也能够找到: * container * page * wrap * rap * container * 网页 * wrap * rap Some Themes may add a second, third, or even fourth sidebar, creating a column effect. Or they may include additional wrappers around the entire page or specific containers, but this is the core structure. 有的主题可能添加了第二个,第三个,甚至第四个工具条,产生了栏状的效应。或者这些主题可能在整个网页或者某个containers的周围添加了额外的wappers,但是这是核心结构。 === The Modular Template Files === === 模模板文件=== Based upon the premise of building blocks, WordPress Themes divide up the core structure between blocks called [[WordPress:Templates|template files]]. These are the template files: 以积木原理为基础,WordPress主题将核心结构分开成一些块,称为[[WordPress:Templates|模板文件]]。下面是一些模板文件: * Header - <tt>header.php</tt> * Sidebar/Menu - <tt>sidebar.php</tt> * Content - <tt>index.php</tt>, <tt>single.php</tt>, <tt>page.php</tt>, <tt>category.php</tt>, <tt>author.php</tt>, <tt>search.php</tt>, etc. * Footer - <tt>footer.php</tt> *标头- <tt>header.php</tt> * 工具条/菜单- <tt>sidebar.php</tt> * 内容 - <tt>index.php</tt>, <tt>single.php</tt>, <tt>page.php</tt>, <tt>category.php</tt>, <tt>author.php</tt>, <tt>search.php</tt>, etc. *页底文字 - <tt>footer.php</tt> As you can see, the content container can be found across many other template files. These are generated dependent upon the user's request. If they click on a category, the category template is displayed. If they choose a [[WordPress:Pages|Page]], the page template is used. And so on. 如你所见到的那样,可以在许多其它的模板文件中找到内容container。这些container是根据用户的需求而产生的。如果你点击类别,就会显示类别模板。如果他们选择了[[WordPress:Pages|网页]],就会用到网页。等等。 Combined with the [[WordPress:The Loop|WordPress Loop]] and queries, a variety of templates can be generated, and the web page designer can style all of these differently and independently from each other. 与[[WordPress:The Loop|WordPress Loop]]和查询相结合,能够产生许多模板,而且网页和设计人员可以将这些模板设计地不同,而且各自独立。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)