Professional Documents
Culture Documents
https://developer.wordpress.org/themes/template-files-section...
Theme Handbook
Browse: Home / Theme Handbook / Template Files Section / Page Template Files / Page Templates
CHAPTERS
1
Getting Started
Who Should Read
This Handbook?
What is a Theme?
WordPress
Licensing & the
GPL
Setting up a
Development
Environment
Theme
Development
Examples
2
Theme Basics
Template Files
Post Types
Organizing Theme
Files
Template
Hierarchy
Template Tags
The Loop
Theme Functions
Linking Theme
Files &
1 von 9
Page Templates
Page templates are a
specic type of template
TOPICS
groups of pages.
Page Templates
within the Template
Hierarchy
a specic type of
template le, here are
Page Templates
some distinguishing
features of page
templates:
Page templates
only apply to
Creating Custom
Page Templates for
Creating a Custom
custom post
types).
Page templates
are used to
change the look
and feel of a page.
A page template
can be applied to
a single page, a
Global Use
Page Template for
One Specic Page
Using Conditional
Tags in Page
Templates
Identifying a Page
Template
Page Template
Functions
page section, or a
class of pages.
13.06.15 12:36
Directories
Including CSS &
JavaScript
https://developer.wordpress.org/themes/template-files-section...
Conditional Tags
Post Template
Files
Page Template
Files
Page
Templates
Attachment
Template Files
Custom Post Type
Template Files
Partial and
Miscellaneous
Template Files
4
Theme Functionality
Core-Supported
Features
Custom
Headers
Post
Formats
Sidebars
full-width, one-column
two-column with a sidebar on the right
two-column with a sidebar on the left
three-column
Widgets
Top
Navigation Menus
Categories, Tags, &
Custom
Taxonomies
Taxonomy
Templates
Pagination
Comments
2 von 9
13.06.15 12:36
Media
https://developer.wordpress.org/themes/template-files-section...
order:
Validating Your
Theme
Plugin API Hooks
6
Required Theme
Files
Testing
Theme Review
Guidelines
Writing
Documentation
Submitting Your
Theme to
WordPress.org
7
Credits
Top
3 von 9
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
Top
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
Top
5 von 9
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
<?php
/**
*
Template
Name:
Full
Width
Page
*
*
@package
WordPress
*
@subpackage
Twenty_Fourteen
*
@since
Twenty
Fourteen
1.0
*/
Once you upload the le
to your themes folder
(e.g., page-templates), go
to the Page >
Edit screen in your admin
dashboard.
On the right hand side
under attributes youll
Top
6 von 9
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
if (
is_front_page()
)
:
get_header(
'home' );
elseif (
is_page(
'About' )
)
:
get_header(
'about' );
else:
get_header();
endif;
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
8 von 9
13.06.15 12:36
https://developer.wordpress.org/themes/template-files-section...
9 von 9
About
Support
Showcase
Blog
Developers
Plugins
Hosting
Get Involved
Themes
Jobs
Learn
Ideas
WordCamp
WordPress.com
WordPress.TV
Matt
BuddyPress
Privacy
bbPress
License / GPLv2
Follow @WordPress
13.06.15 12:36