• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
WordPress Template Hierarchy
 

WordPress Template Hierarchy

on

  • 1,265 views

Presentation from WordCamp NYC 2012

Presentation from WordCamp NYC 2012

Statistics

Views

Total Views
1,265
Views on SlideShare
1,265
Embed Views
0

Actions

Likes
0
Downloads
14
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    WordPress Template Hierarchy WordPress Template Hierarchy Presentation Transcript

    • BEFORE: ONE UNIVERSAL LAYOUTBasic site wireframe: • Header • Navigation • Content • Sidebar • Footer
    • Unique andcustomizable layouts(WP for a blog)Automatic templaterendering(WP as a CMS)
    • WHY IS THIS GOOD FOR BLOGS?•  Be creative with layouts•  Design different layouts for different purposes•  Give visitors more points of entry
    • WHY IS IT GOOD FOR CMS SITES?•  Create different designs for each of your static pages•  Design templates will be applied automatically
    • index.phpstyles.css
    • WP Managed pagesWP Assisted pagesStatic Pages
    • if (is_home()) { Do something}
    • •  Easier to understand•  Easier to manage
    • Category ‘Foo’, ID 41.  category-foo.php2.  category-4.php3.  category.php4.  archive.php5.  index.php
    • JUST A FEW HIERARCHY PAGES404.php home.phparchive.php index.phpattachment.php page.phpauthor.php search.phpcategory.php searchform.phpcomments.php sidebar.phpdate.php single.phpfooter.php single-custom.phpfront-page.php tag.phpfunctions.php taxonomy.php
    • page-{slug}.phpcategory-{name}.phpauthor-{name}.php
    • RESOURCESWordPress Codex:http://codex.wordpress.org/Template_Hierarchyhttp://codex.wordpress.org/Theme_Development#Query-based_Template_FilesDigging Into WordPress (Chris Coyier and Jeff Starr)http://digwp.com/2010/09/wordpress-3-template-hierarchy/WP Tuts +http://wp.tutsplus.com/tutorials/the-wordpress-theme-files-execution-hierarchy/This Presentation:http://bit.ly/WPThierarchy