编辑“WordPress:Themes”
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第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. | ||
The new Theme system provides two convenient features. | The new Theme system provides two convenient features. | ||
; Physically Separate Components :The new WordPress modular [[WordPress:Stepping Into Templates|template files]] system provides a method to define separate physical [[WordPress:Glossary#PHP|PHP]] files for the different components of your WordPress site. This allows creation of unique designs and functionality for many special pages, such as [[WordPress:Category Templates|category archives]], [[WordPress:Creating_an_Archive_Index|monthly archives]], and the individual entry pages. | ; Physically Separate Components :The new WordPress modular [[WordPress:Stepping Into Templates|template files]] system provides a method to define separate physical [[WordPress:Glossary#PHP|PHP]] files for the different components of your WordPress site. This allows creation of unique designs and functionality for many special pages, such as [[WordPress:Category Templates|category archives]], [[WordPress:Creating_an_Archive_Index|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. | ;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 [[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. | ||
==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. | ||
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]]. | ||
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]]. | ||
==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. | ||
Other sources for WordPress Themes may include: | Other sources for WordPress Themes may include: | ||
* [http://www.wordpresstheme.com/ WordPressTheme.com] | * [http://www.wordpresstheme.com/ WordPressTheme.com] | ||
* [http://www.wordpresswow.com WordPress Wow Themes Gallery] | * [http://www.wordpresswow.com WordPress Wow Themes Gallery] | ||
第96行: | 第70行: | ||
* [http://www.ericulous.com/ Smashing Wordpress Themes] | * [http://www.ericulous.com/ Smashing Wordpress Themes] | ||
* [http://www.balkhis.com/category/wp-themes/ Balkhis Wordpress Themes] | * [http://www.balkhis.com/category/wp-themes/ Balkhis Wordpress Themes] | ||
==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. | ||
===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: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'''. | ||
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: | ||
# 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. | # 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 [[WordPress:FTP_Clients|FTP client]] to access your host web server, create a directory to contain your theme in the <tt>wp-content/themes</tt> directory provided by WordPress. For example, a theme named '''Test''' should be in <tt>wp-content/themes/test</tt>. Your theme may provide this directory as part of the archive. | # Using an [[WordPress:FTP_Clients|FTP client]] to access your host web server, create a directory to contain your theme in the <tt>wp-content/themes</tt> directory provided by WordPress. For example, a theme named '''Test''' should be in <tt>wp-content/themes/test</tt>. Your theme may provide this directory as part of the archive. | ||
# 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. | ||
====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. | ||
# Download the theme zip file to your local machine. | # 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". | # 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". | ||
# 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. | # 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. | ||
#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. | ||
===Selecting the Active Theme=== | ===Selecting the Active Theme=== | ||
To select the active theme for your site: | To select the active theme for your site: | ||
# Log in to the WordPress [[WordPress:Administration Panels]]. | # Log in to the WordPress [[WordPress:Administration Panels]]. | ||
# Select the [[WordPress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|Presentation]] subpanel. | # Select the [[WordPress:Administration_Panels#Presentation_-_Change_the_Look_of_your_Blog|Presentation]] subpanel. | ||
# From the '''Available Themes''' section, click on theme title (or theme screenshot) for the theme you wish to activate. | # 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. | # To view the new look, click '''View Site''' at the top of the Panel's screen. | ||
Your selection should immediately become active. | Your selection should immediately become active. | ||
==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]]. | ||
===Theme Files=== | ===Theme Files=== | ||
The following are the files typically included within a Theme. | The following are the files typically included within a Theme. | ||
*[[WordPress:Creating_an_Error_404_Page|404 Template]] = <tt>404.php</tt> | *[[WordPress:Creating_an_Error_404_Page|404 Template]] = <tt>404.php</tt> | ||
第294行: | 第128行: | ||
*[[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> | ||
== 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]]. | ||
==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=== | ||
* [[WordPress:Blog Design and Layout]] | * [[WordPress:Blog Design and Layout]] | ||
第360行: | 第150行: | ||
* [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] | ||
===Templates and Template Tags=== | ===Templates and Template Tags=== | ||
* [[WordPress:Templates|Template Files]] | * [[WordPress:Templates|Template Files]] | ||
第390行: | 第163行: | ||
* [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] | ||
===Tools and Resources=== | ===Tools and Resources=== | ||
* [[WordPress:Designing Themes for Public Release]] | * [[WordPress:Designing Themes for Public Release]] | ||
第430行: | 第177行: | ||
*[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://wordpress.thelinuxpenguin.com/ Tutorial: How to Install a Wordpress Theme] | *[http://wordpress.thelinuxpenguin.com/ Tutorial: How to Install a Wordpress Theme] | ||
===Colors, Graphics, and Fonts=== | ===Colors, Graphics, and Fonts=== | ||
* [http://www.redalt.com/Tools/kubrickr.php Kubrickr - Changes Default Theme Header Images] | * [http://www.redalt.com/Tools/kubrickr.php Kubrickr - Changes Default Theme Header Images] | ||
第459行: | 第190行: | ||
* [http://colr.org Colr.org - For Finding Colors in an Image] | * [http://colr.org Colr.org - For Finding Colors in an Image] | ||
* [http://www.redalt.com/Tools/ilyc.php I Like Your Colors] | * [http://www.redalt.com/Tools/ilyc.php I Like Your Colors] | ||
* [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] |