WordPress:Using Themes/Theme List

来自站长百科
Seadragon530讨论 | 贡献2008年5月4日 (日) 18:20的版本
跳转至: 导航、​ 搜索

Before the advent of Themes, WordPress generated content using a single file, index.php, and files to support comment display and submission. A single style sheet controlled the presentation. All other pages, including the category and archive pages, were generated by passing parameters to the index.php page.

在主题出现之前, WordPress 使用单独的文件生成目录, index.php, 多 文件支持评论的显示和提交。 一个单独的样式表控制着界面。所有其他的页面,包括分类和文档页面,通过传递参数到index.php页面生成。

The new Theme system provides two convenient features.

Physically Separate 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.

新的主题系统提供了两种方便的功能:

Physically Separate Components
新的WordPress标准模板文件系统提供了一种为WordPress站点的不同组件定义分开的 PHP文件的方法。这允许为很多专门的页面创建唯一的设计和功能,如分类文档, 每月文章, 和一些独立的登陆页面。
快速的更改版面和设计
允许具有适当权限的用户通过上传一个新的主题和管理面板中本质上的一点改动快速的更改整体站点的版面。

原先生成页面的方法仍然适用。如果你正 If you are 从1.2版本升级到1.2.1 或者or v1.2.2, 你可以继续使用你现有的设计。。保持你的旧的设计不会妨碍你添加新的主题和在现有两个主题中间切换。

What is a Theme?

Fundamentally, the WordPress Theme system is a way to "skin" your weblog. Yet, it is more than just a "skin." Skinning your site implies that only the design is changed. WordPress Themes can provide much more control over the look and presentation of the material on your website.

什么是主题?

根本上来说,WordPress主题系统是一个给weblog添加"皮肤"的方法。当然,它不仅仅是一个"皮肤." 给你的站点用上皮肤意味着仅仅是设计上的改变。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 Wordpress:Pages, as well as any necessary code files (*.php). For an introduction to template files, see Wordpress:Stepping Into Templates.

WordPress 主题是一个文件的集合,它们一起为weblog创造出了一体的图形界面。这些文件叫做模板文件。 主题修改了站点显示的方式,而没有使用修改软件。主题可以包括自定义模板文件,图片文件(*.jpg, *.gif), style sheets (*.css),自定义页面,以及一些必须的代码文件(*.php)。参见 走进模板,可以找到模板文件介绍.

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 Wordpress:The Loop in Action and Wordpress:Category Templates.

主题是一个完整的新的球类运动。假设你写了很多关于奶酪和小工具的东西。通过WordPress Loop模板文件的创新使用, 你可以自动以你的Cheese分类文章,使其看起来与Gadgets分类不同。有了这种强有力的控制不同的页面和分类外观的工具,能够限制你的只有你的想象力而已。想查找如何在不同的分类或者文章中使用不同的主题,参见 活动的Loop分类模板.

Get New Themes

The WordPress Theme Viewer is the official site for WordPress Themes which have been checked and inspected, and are free for downloading. The site features the ability to search by type and style, and offers a demonstration of the page view elements of the Theme.

获得新的主题

WordPress主题察看是 WordPress已经选中或检查过的主题的官方网站,并且免费下载。 这个站点带有按类型和格式搜索的功能,还提供主题元素的页面预览。

Other sources for WordPress Themes may include:


其他部分WordPress主题资源:

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 Wordpress:Administration Panels > Presentation as additional selections.

使用主题

WordPress 为你的初始使用提供了两种主题。你可以使用管理面板切换这两种主题。添加到那个目录的主题将作为附加选项出现在管理面板>界面中。

Adding New Themes

There are many themes available for download that will work with your WordPress installation.

添加新的主题

有很多主题可以下载,可以用来使用在你的WordPress中。

thumb|right|Presentation Theme PanelIf 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.

thumb|right|Presentation主题面板如果你安装的主题提供说明,一定要仔细阅读按照说明来安装,以便成功的安装。推荐主题开发者为他们的主题提供安装说明, 因为主题可以提供特殊的可选择的功能,可能这会比基本安装需要更多的步骤。如果你的主题在按照这些说明安装后不能运行,请联系作者寻求帮助.

To add a new theme to your WordPress installation, follow these basic steps:

  1. Download the theme archive and extract the files it contains. You may need to preserve the directory structure in the archive when extracting these files. Follow the guidelines provided by your theme author.
  2. Using an FTP client to access your host web server, create a directory to contain your theme in the wp-content/themes directory provided by WordPress. For example, a theme named Test should be in wp-content/themes/test. Your theme may provide this directory as part of the archive.
  3. Upload the theme files to the new directory on your host server.
  4. Follow the [[Wordpress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.

想要添加新的主题到你的WordPress安装中,按照如下基本步骤:

  1. 下载主题文档解压文件。解压缩时需要保护好这个文件中的目录结构。按照主题作者提供的说明进行操作。
  2. 使用一个FTP 客户端进入你的主机网页服务器,在WordPress提供的wp-content/themes目录下创建一个目录来存放你的主题。例如,一个名为Test的主题应该在wp-content/themes/test目录中。 你的主题可以把这个目录作为文档的一部分。
  3. 上传主题文件到你主机服务器上的新的目录。
  4. 按照关于选择新主题的[[Wordpress:#Selecting_the_Active_Theme|下面的说明]]进行操作。

Adding New Themes in cPanel

If your host offers the cPanel control panel, and the theme files are in a .zip or .gz archive follow these instructions. Note: This assumes the theme you download is a compressed (zip) file and the files in the zip file are in their 'named' folder.

  1. Download the theme zip file to your local machine.
  2. In cPanel File Manager, navigate to your themes folder. If you have WordPress installed in it's own folder called wordpress, you would navigate to "public_html/wordpress/wp-content/themes" and if WordPress is installed in your web-root folder you would navigate to "public_html/wp-content/themes".
  3. Once you've navigated to the themes folder in cPanel File Manager, click on Upload file(s) and upload that zip file you saved in Step 1.
  4. Once the zip file is uploaded, click on the zip file name in cPanel, then in the panel to the right, click on Extract File Contents, and that zip file will be uncompressed.
  5. Follow the [[Wordpress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.

在cPanel中添加新主题

如果你的主机提供cPanel 控制面板,主题文件是 .zip或者是.gz格式的文件,按照下面的说明操作。注意:假定你下载的主题是压缩过的 (zip)问而且zip文件中的文件在它们'指定的'文件夹中。

  1. 下载主题zip文件到本地电脑。
  2. 在cPanel文件管理器中找到你的主题文件夹。如果你把WordPress安装到它自己的叫做wordpress的文件夹中, 你应该到 "public_html/wordpress/wp-content/themes" 查找,如果WordPress 安装到了你的web-root 文件夹下,你可以进入"public_html/wp-content/themes"查找。
  3. 一旦你通过cPanel文件管理器进入主题文件夹中,点击Upload file(s),上传你在第一步中保存的zip文件。
  4. zip文件上传完毕后,点击cPanel 中的zip文件名,然后在面板中的右边,点击 Extract File Contents,zip文件就会被解压了。
  5. 按照关于选择新主题的[[Wordpress:#Selecting_the_Active_Theme|下面的说明]]进行操作。

Selecting the Active Theme

To select the active theme for your site:

  1. Log in to the WordPress Wordpress:Administration Panels.
  2. Select the Presentation subpanel.
  3. From the Available Themes section, click on theme title (or theme screenshot) 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.

选择激活的主题

要为你的站点选择激活的主题:

  1. 登陆WordPress 管理面板.
  2. 选择 Presentation|界面子面板。
  3. Available Themes部分点击主题标题(或者主题的截图),激活你想要的主题。
  4. 想查看新的外观,点击面板顶部的View Site

你所选的主题立即就会被激活了。

Creating Themes

If you are interested in creating your own theme for distribution, or learning more about the architecture of themes, please review the documentation regarding Wordpress:Theme Development and Wordpress:Designing Themes for Public_Release.

创建主题

如果你对创建自己的主题感兴趣,或者学习更多有管主题结构的东西,请回顾一下关于主题开发为Public_Release设计主题.

Theme Files

The following are the files typically included within a Theme.

主题文件

以下是包含在主题中的代表性的文件。


== 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.

== 从1.2.x 到1.5 ==

查看: Upgrade 1.2 to 1.5,可以得到有关把WordPress和WordPress主题从v1.2升级到1.5的详细内容。

Theme Tools and Other Resources

These tools and resources will aid you in creating and/or enhancing themes.

主题工具和别的资源

这些工具和资源可以帮助你创建或者增强主题。

Layout

版面

Templates and Template Tags

模板和模板文件


Tools and Resources

工具和资源

Colors, Graphics, and Fonts

颜色, 图片和字体