Wordpress 中文
注册
Advertisement

在主题出现之前,WordPress使用单一文件index.php生成内容,使用其他集中文件支持评论的展示和提交。由单一的样式表控制呈现。所有其他静态页面,包括分类和档案页面,由向index.php页传送参数生成。

新的主题系统提供了两个方便的特性。

Physically Separates Components
The new WordPress modular template files system provides a method to define separate physical PHP files for the different components of your WordPress site. This allows creation of unique designs and functionality for many special pages, such as category archives, monthly archives, and the individual entry pages.
Quickly Change Layout and Design
It allows users with appropriate permissions to quickly change the layout of the entire site by uploading a new theme and essentially flipping a switch in the admin panel.

The old method of generating pages will still work. If you are upgrading from v1.2 or v1.2.1 or v1.2.2, you can continue using your existing design. Keeping your older design will not prevent you from adding additional themes and easily switching between designs.

主题是什么?[ | ]

从根本上说,WordPress主题系统是给你的blog加上“皮肤”的一种方式。然而,它不仅仅是一层“皮肤”。为你的网站增添皮肤只意味着改变其设计。WordPress主题可以在你的网站上为外观和材料呈现提供更多控制。

A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called template files. A theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (*.jpg, *.gif), style sheets (*.css), custom Pages, as well as any necessary code files (*.php). For an introduction to template files, see Stepping Into Templates.

Themes are a whole new ball game. Let's say you write a lot about cheese and gadgets. Through the innovative use of the WordPress Loop and template files, you can customize your Cheese category posts to look different from your Gadgets category posts. With this powerful control over what different pages and categories look like on your site, you are limited only by your imagination. For information on how to use different Themes for different categories or posts, see The Loop in Action and Category Templates.

Get New Themes[ | ]

Theme Announcements[ | ]

Using Themes[ | ]

WordPress supplies two themes in its distribution for your initial use. You can switch between these two themes using the admin panel. Themes that you add to that directory will appear in the Administration Panels > Presentation as additional selections.

添加新的主题[ | ]

有许多和你的WordPress相配的主题

File:Themes.png

Presentation Theme Panel

If the theme that you are installing provides instructions, be sure to read through and follow those instructions for the successful installation of the theme. It is recommended that theme developers provide installation instructions for their own themes, because themes can provide special optional functionality that may require more steps than the basic installation steps covered here. If your theme does not work after following any provided instructions, please contact the theme author for help.

按照下面的简单步骤,添加一个新的主题到你的WordPress:

  1. 下载主题存档并且解压缩其中的文件。 当你在解压缩这些文件的时候,你可能需要保留其在压缩包中的文件结构。并且按照主题作者的指导来进行安装。
  2. 使用 FTP client 来登陆你的Web服务器,在wp-content/themes 目录中建立一个目录来存放你的主题。比如, 一个叫Test的主题应该放在 wp-content/themes/test. 文件夹中。我们的主题文档自身也可能提供这样的一个目录作为主题文档的一部分。
  3. 上传主题文件到你的主机服务器的新目录中。
  4. 遵从instructions below 的指导,选择新的主题.

Selecting the Active Theme[ | ]

To select the active theme for your site:

  1. Log in to the WordPress Administration Panels.
  2. Select the Presentation subpanel.
  3. From the Select column in the table, click on Select for the theme you wish to activate.
  4. To view the new look, click View Site at the top of the Panel's screen.

Your selection should immediately become active.

创建主题[ | ]

如果你对于创建自己的主题,或是对于wordpress的主题构架比较感兴趣,可以回顾复习这些文档 Theme DevelopmentDesigning Themes for Public_Release.

主题文件[ | ]

以下便是在一个主题里面有代表性的文件。

  • 404错误页面 = 404.php
  • 文章显示页面 = archive.php
  • 文章存档显示页面 = archives.php
  • 文章评论模版 = comments.php
  • 页脚模版 = footer.php
  • 页眉模版 = header.php
  • 链接模版 = links.php
  • 主模版 = index.php
  • 默认页面模版 = page.php
  • 弹出评论模版 = comments-popup.php
  • 文章内容显示页面 = single.php
  • 搜索表单 = searchform.php
  • 搜索模版 = search.php
  • 侧边栏模版 = sidebar.php
  • 样式表 = style.css

== Moving from 1.2.x to 1.5 ==

For details on upgrading WordPress and your WordPress Theme from v1.2 to 1.5, see: Upgrade 1.2 to 1.5.

主题工具和其他资源[ | ]

这些工具和资源将帮助你去创建或是增强主题。

版面设计[ | ]

模版和模版标签[ | ]

工具和资源[ | ]

颜色,图形和字体[ | ]

Advertisement