WordPress: Using Themes/Theme List:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: __TOC__ Before the advent of Themes, WordPress generated content using a single file, <tt>index.php</tt>, and files to support comment display and submission. A single style sheet control...)
 
无编辑摘要
第1行: 第1行:
__TOC__
__TOC__
Before the advent of Themes, WordPress generated content using a single file, <tt>index.php</tt>, 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 <tt>index.php</tt> page.  
Before the advent of Themes, WordPress generated content using a single file, <tt>index.php</tt>, 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 <tt>index.php</tt> page.  
在主题出现之前, WordPress 使用单独的文件生成目录, <tt>index.php</tt>, 多 文件支持评论的显示和提交。 一个单独的样式表控制着界面。所有其他的页面,包括分类和文档页面,通过传递参数到<tt>index.php</tt>页面生成。


The new Theme system provides two convenient features.   
The new Theme system provides two convenient features.   
第8行: 第10行:


The old method of generating pages will still work. If you are [[Wordpress:Upgrade_1.2_to_1.5|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.  
The old method of generating pages will still work. If you are [[Wordpress:Upgrade_1.2_to_1.5|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:Stepping Into Templates|模板文件]]系统提供了一种为WordPress站点的不同组件定义分开的 [[Wordpress:Glossary#PHP|PHP]]文件的方法。这允许为很多专门的页面创建唯一的设计和功能,如[[Wordpress:Category Templates|分类文档]], [[Wordpress:Creating_an_Archive_Index|每月文章]], 和一些独立的登陆页面。
;快速的更改版面和设计 :允许具有适当权限的用户通过上传一个新的主题和管理面板中本质上的一点改动快速的更改整体站点的版面。
原先生成页面的方法仍然适用。如果你正 If you are [[Wordpress:Upgrade_1.2_to_1.5|从1.2版本升级到1.2.1 或者or v1.2.2]], '''你可以继续使用你现有的设计。'''。保持你的旧的设计不会妨碍你添加新的主题和在现有两个主题中间切换。


==What is a Theme?==
==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.
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 [[Wordpress:Templates|'''template files''']]. A theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (<tt>*.jpg</tt>, <tt>*.gif</tt>), style sheets (<tt>*.css</tt>), custom [[Wordpress:Pages]], as well as any necessary code files (<tt>*.php</tt>). For an introduction to template files, see [[Wordpress:Stepping Into Templates]].
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 [[Wordpress:Templates|'''template files''']]. A theme modifies the way the site is displayed, without modifying the underlying software. Themes may include customized template files, image files (<tt>*.jpg</tt>, <tt>*.gif</tt>), style sheets (<tt>*.css</tt>), custom [[Wordpress:Pages]], as well as any necessary code files (<tt>*.php</tt>). For an introduction to template files, see [[Wordpress:Stepping Into Templates]].
WordPress 主题是一个文件的集合,它们一起为weblog创造出了一体的图形界面。这些文件叫做[[Wordpress:Templates|'''模板文件''']]。 主题修改了站点显示的方式,而没有使用修改软件。主题可以包括自定义模板文件,图片文件(<tt>*.jpg</tt>, <tt>*.gif</tt>), style sheets (<tt>*.css</tt>),自定义[[Wordpress:Pages|页面]],以及一些必须的代码文件(<tt>*.php</tt>)。参见 [[Wordpress: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:The Loop|WordPress Loop]] and [[Wordpress:Templates|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]].
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:The Loop|WordPress Loop]] and [[Wordpress:Templates|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:The Loop|WordPress Loop]] 和 [[Wordpress:Templates|模板文件]]的创新使用, 你可以自动以你的Cheese分类文章,使其看起来与Gadgets分类不同。有了这种强有力的控制不同的页面和分类外观的工具,能够限制你的只有你的想象力而已。想查找如何在不同的分类或者文章中使用不同的主题,参见 [[Wordpress:The Loop in Action|活动的Loop]]和[[Wordpress:Category Templates|分类模板]].


==Get New Themes==
==Get New Themes==


The [http://themes.wordpress.net/ 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.
The [http://themes.wordpress.net/ 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.
==获得新的主题==
[http://themes.wordpress.net/ WordPress主题察看]是 WordPress已经选中或检查过的主题的官方网站,并且免费下载。 这个站点带有按类型和格式搜索的功能,还提供主题元素的页面预览。


Other sources for WordPress Themes may include:
Other sources for WordPress Themes may include:
第119行: 第140行:
* [http://www.internet-marketing-py.com/kostenlose-wordpress-templates/ Free Wordpress Themes]
* [http://www.internet-marketing-py.com/kostenlose-wordpress-templates/ Free Wordpress Themes]
* [http://www.webfrap.com/ WebFrap - Wordpress Themes Gallery]
* [http://www.webfrap.com/ WebFrap - Wordpress Themes Gallery]
其他部分WordPress主题资源:
* [http://themes.wordpress.net/ WordPress 主题查看]
* [http://wptemplates.org/ WordPress 模板]
* [http://pro-themes.com 高质量WP模板]
* [http://www.blogohblog.com/ 现代WordPress主题]
* [http://www.wordpresstheme.com/ WordPressTheme.com]
* [http://www.elegantwpthemes.com/ ElegantWPThemes.com]
* [http://www.wordpresswow.com WordPress Wow 主题库]
* [http://wordpress.org/support/forum.php?id=5 WordPress 主题支持论坛]
* [http://wpgarden.com/ WordPress 花园 – 主题回顾]
* [http://www.themespack.com/ WordPress 主题 –主题包]
* [http://www.lukaret.com/wordpress-themes/ WordPress主题 by  Beng Hafner]
* [http://wptheme.net/ WordPresstheme.net 免费 WordPress 主题]
* [http://www.bestwpthemes.com/ 最好的WordPress主题]
* [http://themes.rock-kitty.net 免费WordPress主题 - Kate 主题查看器]
* [http://www.einternetindex.com/themes/ 免费WordPress主题]
* [http://templatextreme.com/products/wordpress-themes/关于模板Xtreme 的免费 WordPress主题]
* [http://designoahu.com/wordpress-beer-theme Jeremy Moseley的免费beer主题]
* [http://www.bloggingpro.com/archives/category/wordpress-themes/ Blogging Pro WordPress主题分类]
* [http://wpdemo.kaushalsheth.com/ Kaushal Sheth's WordPress 主题查看]
* [http://biboz.net/themes/ biboz.net 免费WordPress主题]
* [http://www.siteground.com/wordpress-hosting/wordpress-themes.htm SiteGround的免费WordPress主题]
* [http://wpthemes.info/themes/ WordPress主题 by Sadish]
* [http://www.gii.in/themes/ Gii 主题]
* [http://www.skinsforwp.com/free-wordpress-themes.html WordPress皮肤/主题]
* [http://www.prissed.com/ WordPress主题by priss ]
* [http://www.gfxedit.com/themes/wordpress/ GFXedit.com 主题]
* [http://www.dirsurfer.com/blog/wp-free-templates/ Dirsurfer 主题]
*[http://www.emilyrobbins.com/how-to-blog/comprehensive-list-of-615-free-wordpress-15-and-20-themes-templates-available-for-download-266.htm How to Blog的980多种主题的列表]
* [http://www.alexking.org/blog/2005/02/27/wordpress-theme-competition/ Alex King WordPress主题竞赛]
* [http://www.johntp.com/wp-skins/ JohnTP  WordPress 主题集合]
* [http://gallery.wordpress.com/ Gallery for WordPress]
* [http://www.headsetoptions.org/ Headsetoptions WordPress主题]
* [http://www.mandarinmusing.com/ Mandarinmusing WordPress 主题]
* [http://themez.info/ WordPress主题]
* [http://www.yvoschaap.com/wpthemegen/ Yvo Schapp's WordPress 主题生成器]
* [http://www.livelydirectory.com/blog/ 免费WordPress主题]
* [http://milo.peety-passion.com/ miloIIIIVII]
* [http://www.reviewmytheme.com/ ReviewMyTheme 免费WordPress主题]
* [http://www.allinfodir.com/themes/ AllinfoDir WordPress主题]
* [http://www.idk.in/blogs/?cat=14 Genuine WordPress主题]
* [http://www.elegantdirectory.com/wp-themes/ ElegantDirectory WordPress 主题]
* [http://blog.rakcha.com/category/themes/ 来自rakCha的高质量主题]
* [http://www.avivadirectory.com/downloads/category/wordpress-themes/ Aviva WordPress主题]
* [http://www.deeplinklisting.com/blog/ Deep Link 列表 - Blogger - WordPress 主题]
* [http://www.dirjournal.com/wp-themes/ 免费赞助主题]
* [http://www.templatesfactory.net/blog/category/wp-themes/ 免费WordPress主题]
* [http://www.wpthemesfree.com 免费WordPress主题]
* [http://blogosquare.com/wordpress-themes/ BlogoSquare 免费主题下载和回顾]
* [http://www.get-index.com/wordpress-themes/ 免费WordPress主题]
* [http://www.ventedoy.com/themes/ 免费高质量WordPress主题]
* [http://www.themevibes.com 免费WordPress主题]
* [http://www.mygreencorner.com/freewordpressthemes.php免费WordPress主题]
* [http://www.jauhari.net/themes免费WordPress主题]
* [http://www.wpmix.com/ WordPress主题]
* [http://templates.arcsin.se/category/wordpress-themes/ CSS Design Templates上的免费WordPress 主题]
* [http://themes.enquira.com/category/wordpress-themes/ enQuira 主题]
* [http://www.onehertz.com/portfolio/wordpress/ onehertz上的免费&付费主题]
* [http://www.drchetan.com/themes Chetan 免费WordPress主题]
* [http://www.iguides.org/wp-themes/ iGuides免费WordPress主题]
* [http://www.romow.com/blog/category/free-wordpress-themes/  免费WordPress主题by Romow]
* [http://www.blogstheme.com/ 免费WordPress主题 by blogstheme]
* [http://extjswordpress.net/ Ext JS 开发的 WordPress 主题]
* [http://cureless.net/works/wp-themes/ 免费WordPress主题by Yoru @ Cureless]
* [http://www.cmdesignlounge.com/sponsored-themes/ 主题by ChiQ Montes]
* [http://www.allydirectory.com/wpthemes/ 免费WordPress主题]
* [http://www.blueverse.com/resources/wordpress-themes/ Blueverse SEO WordPress 主题]
* [http://www.themebox.org/ ThemeBox WordPress 主题]
* [http://www.askgraphics.com/freetemplates/ WordPress 主题by AskGraphics.com]
* [http://www.themetube.com/ 免费WordPress主题]
* [http://www.madmouse.com/blog/ Squeaky's - WordPress 主题和文章]
* [http://www.thaslayer.com/category/templates/ slayer's web 2.0 和 AJAX Tweaked WordPress 主题]
* [http://www.themelogs.com/free-themes/ 免费WordPress主题]
* [http://forums.digitalpoint.com/showthread.php?p=5342152 Green Fury WordPress 主题]
* [http://imjtk.com/wordpress-themes JTk's 免费主题]
* [http://www.webmastermarty.com/category/wordpress-themes/ Webmaster Marty's WordPress 主题]
* [http://www.bretema.info/ Brétema主题]
* [http://www.themeage.com/ Themeage]
* [http://www.wpbay.com/ 最好的WordPress主题]
* [http://wpthemez.com/ wpthemez上的独特的WordPress主题]
* [http://ericulous.com/ Ericulous WordPress主题]
* [http://wordpress-themes.chromaticsites.com/ Professional WordPress主题- Chromatic Sites]
* [http://www.wordpresssite.com/ WordPress主题-ThemesGallery]
* [http://wptemplates.org/ WordPress 模板]
* [http://www.wordpressthemed.com/ WordPress Themed]
* [http://www.clazh.com/download/ 免费WordPress主题]
* [http://www.uzzz.net/category/wordpress-templates Uzzz 作品主题]
* [http://www.balkhis.com/category/wp-themes/ Balkhis WP Themes]
* [http://www.idk.in/blogs/?cat=14 Genuine WordPress 主题]
* [http://www.allinfodir.com/themes/ AllinfoDir WordPress主题]
* [http://www.reviewmytheme.com/ ReviewMyTheme 免费WordPress模板]
* [http://www.rahmatblog.com/category/wordpress-theme/ Rahmat's 免费WordPress主题]
* [http://www.gomvents.com/free-wordpress-themes.html Gomvents' 免费WordPress 主题 – 每日更新]
* [http://www.wpthemespress.com/ 免费WordPress主题]
* [http://www.dustin-hamilton.net/ Dustin Hamilton Media免费WordPress主题]
* [http://www.5shadestemplates.com/Free-Website-Templates.html免费WordPress主题和模板]
* [http://www.internet-marketing-py.com/kostenlose-wordpress-templates/免费WordPress主题]
* [http://www.webfrap.com/ WebFrap - Wordpress 主题库]


==Using Themes==
==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]] > [[Wordpress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|Presentation]] as additional selections.
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]] > [[Wordpress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|Presentation]] as additional selections.
==使用主题==
WordPress 为你的初始使用提供了两种主题。你可以使用管理面板切换这两种主题。添加到那个目录的主题将作为附加选项出现在[[Wordpress:Administration Panels|管理面板]]>[[Wordpress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|界面]]中。


===Adding New Themes===
===Adding New Themes===


There are many themes available for download that will work with your WordPress installation.
There are many themes available for download that will work with your WordPress installation.
===添加新的主题===
有很多主题可以下载,可以用来使用在你的WordPress中。


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


To add a new theme to your WordPress installation, follow these basic steps:
To add a new theme to your WordPress installation, follow these basic steps:
第136行: 第268行:
# Upload the theme files to the new directory on your host server.
# 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.
# Follow the [[Wordpress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.
想要添加新的主题到你的WordPress安装中,按照如下基本步骤:
# 下载主题文档解压文件。解压缩时需要保护好这个文件中的目录结构。按照主题作者提供的说明进行操作。
# 使用一个[[Wordpress:FTP_Clients|FTP 客户端]]进入你的主机网页服务器,在WordPress提供的<tt>wp-content/themes</tt>目录下创建一个目录来存放你的主题。例如,一个名为'''Test'''的主题应该在<tt>wp-content/themes/test</tt>目录中。  你的主题可以把这个目录作为文档的一部分。
# 上传主题文件到你主机服务器上的新的目录。
# 按照关于选择新主题的[[Wordpress:#Selecting_the_Active_Theme|下面的说明]]进行操作。
====Adding New Themes in cPanel ====
====Adding New Themes in cPanel ====
If your host offers the [[Wordpress:Glossary#cPanel|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.
If your host offers the [[Wordpress:Glossary#cPanel|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.
第143行: 第283行:
#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.
#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.
#Follow the [[Wordpress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.
#Follow the [[Wordpress:#Selecting_the_Active_Theme|instructions below]] for selecting the new theme.
====在cPanel中添加新主题 ====
如果你的主机提供[[Wordpress:Glossary#cPanel|cPanel]] 控制面板,主题文件是 .zip或者是.gz格式的文件,按照下面的说明操作。注意:假定你下载的主题是压缩过的 (zip)问而且zip文件中的文件在它们'指定的'文件夹中。
# 下载主题zip文件到本地电脑。
# 在cPanel文件管理器中找到你的主题文件夹。如果你把WordPress安装到它自己的叫做wordpress的文件夹中, 你应该到 "public_html/wordpress/wp-content/themes" 查找,如果WordPress 安装到了你的web-root 文件夹下,你可以进入"public_html/wp-content/themes"查找。
# 一旦你通过cPanel文件管理器进入主题文件夹中,点击Upload file(s),上传你在第一步中保存的zip文件。
#zip文件上传完毕后,点击cPanel 中的zip文件名,然后在面板中的右边,点击 Extract File Contents,zip文件就会被解压了。
#按照关于选择新主题的[[Wordpress:#Selecting_the_Active_Theme|下面的说明]]进行操作。


===Selecting the Active Theme===
===Selecting the Active Theme===
第153行: 第301行:


Your selection should immediately become active.
Your selection should immediately become active.
===选择激活的主题===
要为你的站点选择激活的主题:
# 登陆WordPress [[Wordpress:Administration Panels|管理面板]].
#选择 [[Wordpress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|Presentation|界面]]子面板。
# 从'''Available Themes'''部分点击主题标题(或者主题的截图),激活你想要的主题。
# 想查看新的外观,点击面板顶部的'''View Site'''。
你所选的主题立即就会被激活了。


==Creating Themes==
==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]].
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]].
==创建主题==
如果你对创建自己的主题感兴趣,或者学习更多有管主题结构的东西,请回顾一下关于[[Wordpress:Theme Development|主题开发]] 和 [[Wordpress:Designing Themes for Public_Release|为Public_Release设计主题]].


===Theme Files===
===Theme Files===
第177行: 第339行:
*[[Wordpress:Customizing Your Sidebar|Sidebar Template]] = <tt>sidebar.php</tt>
*[[Wordpress:Customizing Your Sidebar|Sidebar Template]] = <tt>sidebar.php</tt>
*Stylesheet = <tt>style.css</tt>
*Stylesheet = <tt>style.css</tt>
===主题文件===
以下是包含在主题中的代表性的文件。
*[[Wordpress:Creating_an_Error_404_Page|404 Template]] = <tt>404.php</tt>
*Archive Template = <tt>archive.php</tt>
*[[Wordpress:Creating_an_Archive_Index|Archive Index Page]] = <tt>archives.php</tt>
*Comments Template = <tt>comments.php</tt>
*Footer Template = <tt>footer.php</tt>
*[[Wordpress:Designing Headers|Header Template]] = <tt>header.php</tt>
*Links = <tt>links.php</tt>
*Main Template = <tt>index.php</tt>
*[[Wordpress:Pages|Page Template]] = <tt>page.php</tt>
*Popup Comments Template = <tt>comments-popup.php</tt>
*Post Template = <tt>single.php</tt>
*Search Form = <tt>searchform.php</tt>
*[[Wordpress:Creating a Search Page|Search Template]] = <tt>search.php</tt>
*[[Wordpress:Customizing Your Sidebar|Sidebar Template]] = <tt>sidebar.php</tt>
*Stylesheet = <tt>style.css</tt>


== Moving from 1.2.x to 1.5 == <span id="Moving 1.2.x to 1.5"></span>
== Moving from 1.2.x to 1.5 == <span id="Moving 1.2.x to 1.5"></span>


For details on upgrading WordPress and your WordPress Theme from v1.2 to 1.5, see: [[Wordpress:Upgrade_1.2_to_1.5|Upgrade 1.2 to 1.5]].
For details on upgrading WordPress and your WordPress Theme from v1.2 to 1.5, see: [[Wordpress:Upgrade_1.2_to_1.5|Upgrade 1.2 to 1.5]].
== 从1.2.x 到1.5 == <span id="Moving 1.2.x to 1.5"></span>
查看: [[Wordpress:Upgrade_1.2_to_1.5|Upgrade 1.2 to 1.5]],可以得到有关把WordPress和WordPress主题从v1.2升级到1.5的详细内容。


==Theme Tools and Other Resources==
==Theme Tools and Other Resources==


These tools and resources will aid you in creating and/or enhancing themes.
These tools and resources will aid you in creating and/or enhancing themes.
==主题工具和别的资源==
这些工具和资源可以帮助你创建或者增强主题。


===Layout===
===Layout===
第199行: 第390行:
* [http://www.redalt.com/Tools/builder.php WordPress Index Builder]  
* [http://www.redalt.com/Tools/builder.php WordPress Index Builder]  
* [http://www.wateronlydries.com/?p=158 Photoshop Template for the WordPress Default Theme]
* [http://www.wateronlydries.com/?p=158 Photoshop Template for the WordPress Default Theme]
===版面===
* [[Wordpress:Blog Design and Layout|Blog设计和版面]]
* [[Wordpress:Stepping Into Templates|走进模板]]
* [[Wordpress:Customizing Your Sidebar|自定义边栏]]
* [[Wordpress:Good Navigation Links|好的导航链接]]
* [[Wordpress:Next and Previous Links|下一个和上一个链接]]
* [[Wordpress:Styling Lists with CSS|CSS样式列表]]
* [[Wordpress:Creating Horizontal Menus|创建水平链接]]
* [[Wordpress:Dynamic Menu Highlighting|高亮动态目录]]
* [[Wordpress:FAQ Layout and Design| |FAQ版面和设计]]
* [http://www.redalt.com/Tools/builder.php WordPress 索引创建工具]
* [http://www.wateronlydries.com/?p=158 WordPress默认主题的Photoshop模板]


===Templates and Template Tags===
===Templates and Template Tags===
第212行: 第417行:
* [http://boren.nu/archives/2004/10/16/templates-and-the-is-functions/ Templates and the is functions]
* [http://boren.nu/archives/2004/10/16/templates-and-the-is-functions/ Templates and the is functions]
* [http://www.urbangiraffe.com/2005/04/12/themeguide1/1/ Dissection of a WordPress Theme]
* [http://www.urbangiraffe.com/2005/04/12/themeguide1/1/ Dissection of a WordPress Theme]
===模板和模板文件===
* [[Wordpress:Templates|模板文件]]
* [[Wordpress:Stepping Into Templates|走进模板]]
* [[Wordpress:Stepping Into Template Tags|走进模板标签]]
* [[Wordpress:Template Tags|模板标签]]
* [[Wordpress:Theme Development|开发WordPress主题]]
* [[Wordpress:The Loop in Action|激活的Loop]]
* [http://guff.szub.net/wordpress/template-tags/ 简单易读的模板标签版面]
* [http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/ WordPress 主题解析]
* [http://boren.nu/archives/2004/10/16/templates-and-the-is-functions/ 模板和the is 函数]
* [http://www.urbangiraffe.com/2005/04/12/themeguide1/1/ WordPress主题解析]


===Tools and Resources===
===Tools and Resources===
第226行: 第445行:
*[http://coevolving.com/blogs/index.php/archive/installing-and-customizing-wordpress-on-your-own-domain/ Coevolving Innovations guide to Installing Wordpress (including a Theme) on a web host with Fantastico and cPanel] (at Wordpress 2.2.1)
*[http://coevolving.com/blogs/index.php/archive/installing-and-customizing-wordpress-on-your-own-domain/ Coevolving Innovations guide to Installing Wordpress (including a Theme) on a web host with Fantastico and cPanel] (at Wordpress 2.2.1)
*[http://www.danielesalamina.it/screencast-come-modificare-il-proprio-tema-wordpress-in-5-minuti-con-firebug Screencast: Hack a Theme in 5 minute with Firebug]
*[http://www.danielesalamina.it/screencast-come-modificare-il-proprio-tema-wordpress-in-5-minuti-con-firebug Screencast: Hack a Theme in 5 minute with Firebug]
===工具和资源===
* [[Wordpress:Designing Themes for Public Release|为公开发行设计主题]]
* [[Wordpress:Know Your Sources|了解你的资源]]
* [[Wordpress:Validating a Website|验证网站]]
* [[Wordpress:Finding Your CSS Styles|找到你的CSS样式]]
* [[Wordpress:CSS Fixing Browser Bugs|CSS修正你的浏览器错误]]
* [http://elasticdog.com/2004/11/wp-design-sandbox/ WordPress设计Sandbox文章]
* [http://www.cameraontheroad.com/index.php?p=594 CSS 和WordPress 主题工作 (使用sandbox)]
*[http://theundersigned.net/2006/05/from-xhtmlcss-to-wordpress/ 从XHTML CSS 到 WordPress (制作主题}]
*[http://www.jonathanwold.com/tutorials/wordpress_theme/ 指南: 如何创建一个 Wordpress 主题]
*[http://coevolving.com/blogs/index.php/archive/installing-and-customizing-wordpress-on-your-own-domain/ 在一个网页主机上安装带有Fantastico and cPanel的Wordpress (包括主题) 的Coevolving Innovations 指南] (Wordpress 2.2.1)
*[http://www.danielesalamina.it/screencast-come-modificare-il-proprio-tema-wordpress-in-5-minuti-con-firebug Screencast: 使用Firebug,5分钟内Hack一个主题]


===Colors, Graphics, and Fonts===
===Colors, Graphics, and Fonts===
第241行: 第474行:
* [http://www.2yi.net/free-stock-photos.html List of More than 70 Free Stock Photo Sites]
* [http://www.2yi.net/free-stock-photos.html List of More than 70 Free Stock Photo Sites]
* [http://labs.adobe.com/technologies/kuler/ kuler - Create color palettes with this web app from Adobe Labs]
* [http://labs.adobe.com/technologies/kuler/ kuler - Create color palettes with this web app from Adobe Labs]
===颜色, 图片和字体===
* [http://www.redalt.com/Tools/kubrickr.php Kubrickr – 改变默认主题的页眉图片]
* [http://www.digitalwestex.com/gallery/index.php?cat=3 页眉图片]
* [http://creativecommons.org/image/ Creative Commons 图片]
* [http://www.imageafter.com/ Image * After – 免费图片库]
* [http://www.freeiconsweb.com/ 免费图标库]
* [http://www.sxc.hu/ Stock.xchng -免费图片库]
* [[Wordpress:Playing With Fonts|玩字体]]
* [[Wordpress:Developing a Colour Scheme|开发彩色主题]]
* [http://colr.org Colr.org – 在图片中寻找色彩]
* [http://www.redalt.com/Tools/ilyc.php 我喜欢你的色彩]
* [http://www.2yi.net/free-stock-photos.html 超过70个免费照片站点的列表]
* [http://labs.adobe.com/technologies/kuler/ kuler – 从Adobe Labs使用web app创建彩色调色板]

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

颜色, 图片和字体