WordPress themes live in directories residing in wp-content/themes/. A theme named “Test”, for example, might live in wp-content/themes/Test. This theme directory will hold all of the theme’s stylesheets, templates, and images. A WordPress theme must have a stylesheet called style.css. If the theme inherits its templates from another theme, then the theme directory would contain only the stylesheet and possibly some images.
The interesting case is where the theme provides its own templates. In this case, the theme directory must contain an index.php file. This is the master template for the theme, and it must exist. Other templates you most likely will want to include with your theme are comments.php and comments-popup.php. These provide the comment and popup comment templates for your theme. If you do not provide these, the default wp-comments.php and wp-comments-popup.php will be used. These default templates may not match your theme very well, so you probably will want to provide your own.
Those are the basic files needed to make a theme. Place style.css, index.php, comments.php, and comments-popup.php in their own directory beneath wp-content/themes/, and you have a theme. But wait, there’s more. WordPress can load different templates for different query types. The various query types are briefly described here. Basically, if your theme provides a template called category.php and a category is currently being queried, category.php will be loaded instead of index.php. If category.php is not present, index.php is used as usual.
Here is the list of theme files recognized by WordPress. Of course, your theme can contain any templates, stylesheets, images, or other files you wish to include. Just keep in mind that the following have special meaning to WordPress.
- style.css – The main stylesheet. This must be included with your theme.
- index.php – The main template. If your theme provides its own templates, index.php must be present.
- comments.php – The comments template. If not present, wp-comments.php is used.
- comments-popup.php – The popup comments template. If not present, wp-comments-popup.php is used.
- single.php – The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
- page.php – The page template. Used when a page is queried.
- category.php – The category template. Used when a category is queried.
- author.php – The author template. Used when an author is queried.
- date.php – The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
- archive.php – The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
- search.php – The search template. Used when a search is performed.
- 404.php – The 404 Not Found template. Used when WordPress cannot find a post that matches the query.
es | 2004-11-10 @ 10:42:19 | Ryan Boren beschreibt, wie man WordPress-Themen baut: Anatomy of a WordPress Theme Diese Anleitung ist allerdings 1.3-spezifisch  [...]
WordPress Themen schreiben
Ryan Boren beschreibt, wie man WordPress-Themen baut: Anatomy of a WordPress Theme
Diese Anleitung ist allerdings 1.3-spezifisch — die 1.2-Version bietet diese Funktionalitt noch nicht.
Die Thembarkeit ist sehr hilfreich, um seine eigenen nder…
y Knew Ye Anatomy of a WordPress Theme Ryan Boren has written an article describing the components of a WordPress 1.3 theme. [This is good!] [...]
of a WordPress Theme Archivado en: Enlaces, WordPress — Bicherele @ 2:57 pm Anatomy of a WordPress Theme – boren.nu WordPress themes live in directories re [...]
WordPress Themes
Ryan Boren, |WordPress| developer extraorinaire, posted an article describing how themes are contructed for the upcoming release of WordPress 1.3. Will be useful sometime next summer when I find time to upgrade.
Anatomy of a WordPress Theme
Ryan Boren explains how themes will work in WordPress 1.3. This will make the upgrade path much, much easier.
This is huge, in my mind.
Anatomy of a WordPress Theme System
Filed under: Blogging — skebrown @
Anatomy of a WordPress Theme I guess there have been a lot questions regarding [...]
WordPress Themes
November 11th, 2004 3:31 pm
File under: Asides
Anatomy of a WordPress Theme from Ryan the rockstar.
« WYSIWYG Plugi [...]
a WordPress Theme This link is going around – but I still want to save it for myself… Anatomy of WordPress theme A list of templates that you can create for a theme [...]
.nu – Blog Archive – Anatomy of a WordPress Theme
Dominik, 12.11.2004 – 10:31
boren.nu – Blog Archive – Anatomy of a WordPress Theme
[...]
2 Noviembre, 2004 a las 11:02 am
« El bluf de Yaycos.com
Anatomy of a WordPress ThemeEn este post te enseña la organizaación de un tema [...]
#8212; site admin @ 11:33 am
Definition of files used by the WordPress Themes. Anatomy of a WordPress Theme
[...]
Onward to WP 1.3!
My test blog has moved from Movable Type 3.x to an alpha version of WordPress 1.3……
our weblog’s appearance and structure. For more information about themes, see “Anatomy of a WordPress Theme” at boren.nu. For more on pages, you’l [...]
stoy escribiendo la traducción de los posts de Ryan Boren sobre los los temas de WP: Anatomia de un tema de WordPress Plantillas y la función is [...]
WordPress Themes
Nu WP 1.3 steeds dichterbij gaat komen, wordt het maar eens tijd om je te gaan verdiepen in themes.
Het grote voordeel is dat alle verschillende pagina’s (individuele posts, archieven, categorie, etc) allemaal een eigen template (.php file) kunnen …
For the time being …
Updated to WP 1.3 – be patient
…
Anatomia di un Tema WordPress
In “Anatomy of a WordPress Theme”:http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/ Ryan Boren descrive la struttura dei temi —forse la caratteristica più importante della prossima versione di WordPress.
Gli sviluppatori di …
WordPress 1.2.2
Newly available, WordPress 1.2.2. This is mainly a security and bugfix release. Some users have taken us to task for taking so long to get this release out. But as Matt said, there were several issues being worked on simultaneously, and it seemed mor…
long. For more information about these different templates within WordPress, you can see this link. When I do unveil my single pag [...]
[...] ly I’ll have something put together by this evening. Working with Themes Resources: Anatomy of a WordPress Theme WordPress Themes (thanks Tom) [...]
[...] include. Just keep in mind that the following have special meaning to WordPress.”… [boren.nu � Blog Archive � Anatomy of a WordPress Theme]
[...]
[...] ly I’ll have something put together by this evening. Working with Themes Resources: Anatomy of a WordPress Theme WordPress Themes (thanks Tom) This [...]
[...] a WordPress 1.5 Theme Filed under: WordPress Linkfood — Geof @ 12:10 Anatomy of a WordPress theme on Ryan Boren’s Weblog. IJSM.org is the ins [...]
[...] these pages if you have questions about how to create a theme: Blog Design and Layout Anatomy of a WordPress Theme Also note that I changed the required theme swi [...]
[...] .
Thursday, March 3, 2005
Anatomy of a WordPress Theme
boren.nu: Anatomy of a WordPress Theme. “Place style.css, index.php, comments.php, [...]
[...] i que voy un poco liado … pero bueno, todo se andará. He consultado estas fuentes: Boren.nu y WordPress.org Yo creo que en unos dias tendre algo decente que pued [...]
[...] que voy un poco liado … pero bueno, todo se andará. He consultado estas fuentes: Boren.nu y Wordpress.org Yo creo que en unos dias tendre algo decente que pu [...]
[...] dì 23 Marzo 2005
Sto leggendo attentamente il wiki e le guide (1, 2) di Ryan Boren sulla creazione di un tema WordPress. Ne voglio fare uno tu [...]
[...]
Theme Anatomy
March 31st, 2005
Visual Anatomy Ryan’s Theme Anatomy Codex Analysis
Entry Filed under: General, sty [...]
[...] er ist die Struktur der WordPress 1.5 Themes nicht einfach zu verstehen. Im Beitrag “Anatomy of a WordPress Theme” hat Ryan die Grundlagen erklärt. Moshu hat [...]
[...] ld! » wordpress theme un site interesant referitor la temele wordpress: http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/ This entry was posted on Monday, April 11th, [...]
[...] somewhat useful, though I prefer the next link a little more–just my own preference Anatomy of a WordPress Theme Templates and the “is” Functions [...]
[...] ences This page borrows heavily from the following articles: * Ryan Boren’s Anatomy of a Theme (http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/) * Moshu’s Visual Anatomy of a WP v1.5 Theme (http://www.transycan.net/wp/archives [...]
[...] post有不同的风格的plugin 预览theme的plugin(不用在后台激活转换theme) 解剖wordpress theme各文件的作用 Alex的theme竞赛(已结束,很多 [...]
[...] ag Layout in simple to read form
The Loop in Action
Anatomy of a WordPress Theme
WordPress Templates and the is f [...]
[...]
Lead WordPress developer, Ryan Boren explains the Anatomy of a WordPress Theme. I want this for future when I start skinning temp [...]
Visual Anatomy of a WP 1.5 Theme
Everything related to WP, themes, design… has been moved to my Development Blog. Sorry for the inconvenience.
…
[...] Via: http://www.transycan.net/abc/visual_anat.html This visual aid relies heavily on Ryan Boren’s post Anatomy of a WordPress Theme and several Codex articles, like Theme Development, Templates, Template Hierarchy etc. (see also the whole section titled Templates and Themes from the Blog Desing and Layout chapter of the Codex). Technorati Tags: theming wordpress [...]
[...] Anatomy of a WordPress Theme [...]
[...] wordpress的表现能力很强,代码结构清晰,想基于wordpress的代码来快速学习php,逐整理如下: WordPress Codex 最全的wordpress在线手册,但是命运和zh.wikipedia.org一样,被blank off了,只能通过代理上去。 WordPress Guide WordPress Theme Guide Anatomy of a WordPress Theme WordPress Plugin Database WordPress Theme Browser [...]
[...] Ryan’s Theme Anatomy [...]
Visual Anatomy of a WP 1.5 Theme…
While spending some time in the WordPress support forum I realized that for most new users it’s quite difficult to grasp the theme/template system used in this version. Although there are a lot of excellent articles in the Codex it occurred to m…
[...] boren.nu: Anatomy of a WordPress Theme [...]
Anatomy of a WordPress Theme…
Here’s one well-written article on WP’s theme. For one thing, I found out I can probably make a single post template for this Falling Dreams theme (which lacks one.)
Of more interest is this:
“If the theme inherits its templates f…
[...] Here’s a well-written article on WP’s theme. For one thing, I found out I can probably make a single post template for this Falling Dreams theme (which lacks one.) [...]
[...] Anatomy of a WordPress Theme [...]
[...] Anatomy of a WordPress Theme (http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/) [...]
[...] 10) 현재 Update되고 있지는 않으나, 테마 가이드와 팁이 있는 곳: 10.1) UrbanGiraffe: Dissection of a WordPress Theme 10.2) ChrisJDavis: Secrets of WP Theming 10.3) Tech Wench: WordPress 1.5 Theme Cheet-Sheet 10.4) boren.nu: Anatomy of a WordPress Theme [...]
[...] * Template Files * Stepping Into Templates * Stepping Into Template Tags * Template Tags * Developing WordPress Themes * The Loop in Action * Template Tag Layout in simple to read form (http://guff.szub.net/wordpress/template-tags/) * Anatomy of a WordPress Theme (http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/) * Templates and the is functions (http://boren.nu/archives/2004/10/16/templates-and-the-is-functions/) * Dissection of a WordPress Theme (http://www.urbangiraffe.com/2005/04/12/themeguide1/1/) [...]
[...] WordPress theme ‘anatomy’: Theme Development, Blog Design and Layout, Anatomy of a WordPress Theme and Visual Anatomy of a WP 1.5 theme (still good info). Last, but not least: Dissection of a WordPress theme: Part 1. [...]
[...] Anatomy of a WordPress Theme (http://boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/) [...]
[...] Anatomy of a WordPress Theme [...]
[...] Use WordPress 1.3 template system to provide a richer, more varied user experience (see “Anatomy of a WordPress Theme,” by Ryan Boren). In particular, I’d like to bring the search feature more into line with Jeff Veen’s recommendations. I could do this without WordPress 1.3, but I’d rather wait and use the new features than hack something together now. [...]
[...] Ryan has detailed instructions for making a WordPress theme. [...]
Anatomy of a WordPress 1.3 Theme…
Anatomy of a WordPress Theme
Hört sich doch schick an! Ich wollte auch schon ein verschiedenes Template für die Archive verwenden, kam aber zeitlich nicht dazu. Nun wird das ja alles einfacher mit WordPress 1.3, da bin ich glatt nochmals en…
[...] boren.nu [...]
[...] Anatomy of a theme [...]
[...] Cornerscribe is having some serious difficulty choosing a new WordPress theme, so they are throwing a contest for the best theme. And no, you don’t have to create a theme to enter. If you are still wondering what WordPress theme is all about, you might want to visit this anatomy of a WordPresss Theme. [...]
[...] boren.nu [...]
[...] Anatomy of a WordPress Theme from boren.nu [...]
[...] Anatomy of a WordPress Theme [...]
[...] theme ‘anatomy’: Theme Development, Blog Design and Layout, Anatomy of a WordPress Theme and Visual Anatomy of a WP 1.5 theme (still good info). Last, but not least, the Urban [...]
[...] Anatomy of a WordPress Theme – To get you started, you should learn about how a theme is organized. [...]
[...] Anatomy of a WordPress Theme from boren.nu [...]
[...] Anatomy of a theme [...]
[...] Boren’s Anatomy of a WordPress Theme [...]