WordPress:Themes
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.
;分开组成部分:新的WordPress模块模板 文件系统提供了一种方法,为WordPress站点的不同部分,定义不同的PHP文件。这样能够为许多特别的网页创建独一的设计和功能,例如类别归档, 按月归档,以及只有一篇文章的网页。
- 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.
创建网页的旧方法仍然适用。如果你从1.2或者1.2.1或者1.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主题系统是"包装"你的博客外观的方式。但是,主题不仅起着"包装"作用。包装你的站点暗示只有设计更改了。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主题指的是一些文件的集合,这些文件一起运行,输出一种图形界面,这个图形界面拥有网页日志的潜在的统一的设计。这些文件称为模板文件。主题可以更改站点的显示方式,但是不会更改潜在的软件。主题可能包含自定义的模板文件,图像文件(*.jpg, *.gif),样式表(*.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.
主题是一种全新的情况。假如你写了许多关于奶酪和gadgets的文章。通常创新性地使用WordPress Loop 和模板文件,你可以自定义你的奶酪类别文章,使得这些文章与你的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 Theme Viewer是WordPress主题的官方站点,这个站点中的主题得到审查,而且可以免费下载。你可以在这个站点上通过主题的类型和样式搜索主题,而且可以看到主题的网页浏览元素。
Other sources for WordPress Themes may include:
WordPress主题的其它资源,包括:
- WordPressTheme.com
- WordPress Wow Themes Gallery
- WordPress Support Themes forum
- Professional WordPress Themes
- WordPress Garden - Theme reviews
- WordPress Themes by Beng Hafner
- Best WordPress Themes
- Free Wordpress Themes - Kate's Theme Viewer
- Free Wp Themes
- Free WordPress Themes on TemplateXtreme
- Blogging Pro WordPress Themes Category
- Kaushal Sheth's WordPress Theme Viewer
- biboz.net Free WordPress Themes
- WP Themes by Sadish
- Gii Themes
- Skins/Themes for WordPress
- WordPress Themes by priss
- GFXedit.com Themes
- Dirsurfer Themes
- How to Blog's List of 980+ Themes
- Alex King's WordPress Theme Competition
- JohnTP's WordPress Themes Collection
- Gallery for WordPress
- Headsetoptions WP Themes
- Mandarinmusing WP Themes
- Themes for WordPress
- Yvo Schapp's WordPress Theme Generator
- Free WordPress Themes
- miloIIIIVII
- ReviewMyTheme Free WordPress Template
- AllinfoDir WP Themes
- Genuine WP Themes
- ElegantDirectory WordPress Themes
- High Quality Themes from rakCha
- Aviva WordPress Themes
- Free Sponsored Themes
- Free WP Themes
- Free Wordpress Themes
- BlogoSquare Free Theme downloads and reviews
- Free WordPress Themes
- Free High Quality Wordpress Themes
- Madmouse Extreme Blog - WordPress Articles and Themes
- Free WorPpress Themes
- Free WordPress Themes
- Free WordPress Themes
- Wordpress Themes
- Smashing Wordpress Themes
- Balkhis Wordpress Themes
- WordPressTheme.com
- WordPress Wow 主题库
- WordPress 支持主题论坛
- 专业的WordPress主题
- WordPress Garden - Theme 浏览
- Beng Hafner创建的WordPress主题
- 最好的 WordPress 主题
- 免费的 Wordpress 主题 – Kate的主题浏览器
- 免费的 Wp 主题
- TemplateXtreme上免费的WordPress主题
- Blogging Pro WordPress主题类别
- Kaushal Sheth的WordPress 主题浏览器
- biboz.net 免费的 WordPress 主题
- Sadish的WP主题
- Gii 主题
- Skins/ WordPress主题
- priss的WordPress主题
- GFXedit.com 主题
- Dirsurfer 主题
- How to Blog's List of 980+ 主题
- Alex King's WordPress 主题竞赛
- JohnTP的WordPress 主题集
- Gallery for WordPress
- Headsetoptions WP Themes
- Mandarinmusing WP Themes
- WordPress主题
- Yvo Schapp's WordPress Theme Generator
- 免费的 WordPress 主题
- miloIIIIVII
- ReviewMyTheme免费的WordPress 模板
- AllinfoDir WP 主题
- 主题
- ElegantDirectory WordPress 主题
- High Quality Themes from rakCha
- Aviva WordPress 主题
- Free Sponsored主题
- 免费的WP主题
- 免费的Wordpress主题
- BlogoSquare 免费主题下载及浏览
- 免费的 WordPress主题
- 免费的高质量的 Wordpress主题
- Madmouse Extreme Blog - WordPress 文章和主题
- 免费的WorPpress主题
- 免费的WordPress主题
- WordPress主题
- Wordpress主题
- Smashing Wordpress 主题
- Balkhis 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发行的两个主题。你可以使用管理面板,切换使用两个主题。你添加到目录中的主题会出现在管理面板 > Presentation中,作为额外的选项。
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:
要为你的WordPress添加一个新的主题,请遵循下面的基本步骤:
- 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.
- 下载主题归档并且解压这些归档所包含的文件。解压这些文件的时候,你可能需要在归档中保存这些目录结构。遵循主题作者提供的指导。
- 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.
- 使用FTP client访问你的主机网络服务器,创建一个目录,将主题包含在WordPress提供的wp-content/themes目录。例如,一个名为测试的主题应该包含在wp-content/themes/test。你的主题应该提供这个目录,作为归档的一部分。
- Upload the theme files to the new directory on your host server.
- 将主题文件上传到你的主机服务器的新目录中。
- Follow the [[WordPress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.
- 遵循[[WordPress:#Selecting_the_Active_Theme|下面的指示]]选择新的主题。
Adding New Themes in cPanel[ ]
在 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.
如果你的主机提供cPanel控制面板,而且主题文件在.zip 或者 .gz归档中,遵循这些指示说明。注:这个前提是你下载的主题是个压缩文件而且压缩文件中的文件在'指定的'文件夹中。
- Download the theme zip file to your local machine.
- 将主题压缩文件下载到你的本地电脑上。
- 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".
- 在cPanel文件管理器中,导航到当你主题文件夹。如果你将WordPress安装在其自身称为wordpress的文件夹中,你将会导航到"public_html/wordpress/wp-content/themes",如果WordPress安装在你的网络根文件夹中,你将会导航到"public_html/wp-content/themes"。
- 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.
- 你一旦导航到了cPanel文件管理器中的主题文件夹,点击上传文件,上传你在第一步时,保存的压缩文件。
- 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.
- 上传好压缩文件之后,点击cPanel中的压缩文件名,然后再在右边的面板上,点击提取文件内容,这个压缩文件就会被解压。
- Follow the [[WordPress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.
- 遵循[[WordPress:#Selecting_the_Active_Theme|下面的指示说明]],选择新的主题。
Selecting the Active Theme[ ]
选择 Active 主题[ ]
To select the active theme for your site:
为你的站点选择active主题:
- Log in to the WordPress WordPress:Administration Panels.
- 登录到WordPress 管理面板。
- Select the Presentation subpanel.
- 选择Presentation子面板。
- From the Available Themes section, click on theme title (or theme screenshot) for the theme you wish to activate.
- 在可获得的主题部分,为你希望激活的主题,点击主题标题(或者主题截屏)。
- To view the new look, click View Site at the top of the Panel's screen.
- 要访问新的外观,请在面板界面的顶上方点击访问站点。
Your selection should immediately become active.
操作立马就会激活。
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.
如果你对创建发行主题感兴趣,或者你想要学习更多的关于主题结构的内容,请查看关于主题发展 和 Designing Themes for Public_Release方面的文档。
Theme Files[ ]
主题文件[ ]
The following are the files typically included within a Theme.
下面是主题中通常包含的文件。
- 404 Template = 404.php
- Archive Template = archive.php
- Archive Index Page = archives.php
- Comments Template = comments.php
- Footer Template = footer.php
- Header Template = header.php
- Links = links.php
- Main Template = index.php
- Page Template = page.php
- Popup Comments Template = comments-popup.php
- Post Template = single.php
- Search Form = searchform.php
- Search Template = search.php
- Sidebar Template = sidebar.php
- Stylesheet = style.css
- 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 ==
== 从1.2.x 移到 1.5 ==
For details on upgrading WordPress and your WordPress Theme from v1.2 to 1.5, see: Upgrade 1.2 to 1.5.
关于将WordPress和你的WordPress主题从1.2版本升级到1.5版本的详细信息,请看看:从1.2升级到1.5。
Theme Tools and Other Resources[ ]
主题工具和其它的资源[ ]
These tools and resources will aid you in creating and/or enhancing themes.
这些工具和资源会帮助你,创建和/或者提高主题。
Layout[ ]
布局[ ]
- WordPress:Blog Design and Layout
- WordPress:Stepping Into Templates
- WordPress:Customizing Your Sidebar
- WordPress:Good Navigation Links
- WordPress:Next and Previous Links
- WordPress:Styling Lists with CSS
- WordPress:Creating Horizontal Menus
- WordPress:Dynamic Menu Highlighting
- FAQ Layout and Design
- WordPress Index Builder
- Photoshop Template for the WordPress Default Theme
- 博客设计和布局
- 走进模板
- 自定义你的边栏
- 好的导航链接
- 上一个和下一个链接
- CSS的设计表
- 创建横向菜单
- 动态菜单聚焦
- FAQ 布局和设计
- WordPress Index Builder
- WordPress 默认主题的Photoshop模板
Templates and Template Tags[ ]
模板和模板标签[ ]
- Template Files
- WordPress:Stepping Into Templates
- WordPress:Stepping Into Template Tags
- WordPress:Template Tags
- Developing WordPress Themes
- WordPress:The Loop in Action
- Template Tag Layout in simple to read form
- Anatomy of a WordPress Theme
- Templates and the is functions
- Dissection of a WordPress Theme
- 模板文件
- 走进模板
- 走进模板标签
- 模板标签
- 正在发展的 WordPress 主题
- 运转的Loop
- 便于阅读的模板标签布局
- WordPress主题解析
- 模板 and the is functions
- 讨论WordPress主题
Tools and Resources[ ]
工具和资源[ ]
- WordPress:Designing Themes for Public Release
- WordPress:Know Your Sources
- WordPress:Validating a Website
- WordPress:Finding Your CSS Styles
- WordPress:CSS Fixing Browser Bugs
- WordPress Design Sandbox Article
- Working On CSS and the WordPress Theme (using a sandbox)
- From XHTML CSS to WordPress (making a Theme}
- Tutorial: How to Create a Wordpress Theme
- Coevolving Innovations guide to Installing Wordpress (including a Theme) on a web host with Fantastico and cPanel (at Wordpress 2.2.1)
- Tutorial: How to Install a Wordpress Theme
- 为公开发行设计主题
- 了解你的原始资料
- 确认网站
- 找到你的CSS样式
- CSS解决浏览器程序错误
- WordPress Design Sandbox Article
- 处理CSS 和WordPress主题(使用 sandbox)
- 从XHTML CSS到WordPress (创建主题}
- 指南: 怎样创建一个WordPress主题
- Coevolving Innovations guide to Installing Wordpress (包含一个主题) on a web host with Fantastico and cPanel (在 Wordpress 2.2.1版本)
- 指南:怎样安装Wordpress 主题
Colors, Graphics, and Fonts[ ]
颜色,图形,和字体[ ]
- Kubrickr - Changes Default Theme Header Images
- Header Graphics
- Creative Commons Images
- Image * After - Free Stock Image Library
- Free Icons Library
- Stock.xchng - Free Stock Image Library
- WordPress:Playing With Fonts
- WordPress:Developing a Colour Scheme
- Colr.org - For Finding Colors in an Image
- I Like Your Colors
- List of More than 70 Free Stock Photo Sites
- kuler - Create color palettes with this web app from Adobe Labs