SlideShare a Scribd company logo
July
                                      14




WordCamp Columbus
WordPress Template
    Hierarchy

Presented by Al Davis- WPTeach.com
WordCamp Developers Toronto

                                                     WordPress Developers


Who’s
                                                           Toronto
              TELUS
           SMB ‘Portal God’
                                      Al
the bald   Freelance Developer
                                     Davi
                                      s
                                                       WordCamp Toronto



guy?
                                                        Owner-wpteach.com



                                                Toronto WordPress
                           College Professor         Meetup

                                Intro to WordPress


                     Intro to WordPress Theme and Plugin Development
The        What file(s) does WordPress use when it
Question       displays a certain type of page?
The
Answer?
header.php


Lets               sidebar.php


start with
the                  The Loop


basics
              footer.php
A
working       index.php + style.css =

theme     A very basic but functional theme

needs:
So what
is with all
of this
then?
              A: Different looks for different types of content
Home Page Display Rules   1   home.php




                          2
                          index.php
1
                         front-page.php
                         This is used for displaying your latest posts or a static page as
                         defined in Settings > Reading




                     2
Front or Home page   Page Display Rules
                     When you set the Front page in Settings> Reading




                     3
                         Home Page Display Rules
                         When posts page is set in the Front Page displays section of
                         Settings> Reading
1
                     Custom Template File
                     The page template assigned to the page
                     <?php
                     /* Template Name: Whatever you call your template*/
                     ?>



                     2
                     page-{slug}.php
                     if you use the slug “ bananas” WordPress will look for page-
                     bananas.php
Page Display Rules

                     3
                     page-{id}.php
                     if the page ID is 4, Wordpress looks to use page-4.php




                     4
                     page.php



                     5   index.php
Singular Page
                1   Single Post Page




                2
                Static page
1   Attachment post



Singlular page

  Single post    2
                 Custom Post




                 3
                 Blog post
MIME-type.php


                          1
                              It can be any MIME type ( video.php, image.php, etc) for
                              text/plain in order:
                              3.text.php
                              4.plain.php
                              5.text_plain.php




Singular Post             2
                          attachment.php


Single Post- Attachment
                          3
                          single-attachment.php




                          4
                          single.php



                          5
                          index.php
1
                           single-{posttype}.php
                           if post type was “movies”, WordPress would look for
                           single-movies.php


 Singular Post
Single Post- Custom Post   2   single.php




                           3
                               index.php
1
                         single-post.php


Singular Post
Single Post- Blog Post   2   single.php




                         3
                             index.php
1
                        Custom Template File
                        The page template assigned to the page
                        <?php
                        /* Template Name: Whatever you call your template*/
                        ?>



                        2
                        page-{slug}.php
                        if you use the slug “ bananas” WordPress will look for page-
                        bananas.php
Singular Page

     Static page-
         aka            3
                        page-{id}.php
                        if the page ID is 4, Wordpress looks to use page-4.php


“ Page Display Rules”
                        4
                        page.php



                        5   index.php
1
                Post Pages

                Category Pages
                Tag Pages
                Custom Post Types



Archive Pages
                2   Author Pages




                3   Date Pages
ategory Pages Pages
           Tag  1
                             Date Pages
                  Author Pages

 1 category-{slug}.php      1 tag-{slug}.php         1 author-{nicename}.php   1 date.php

 2 category-{id}.php        2 tag-{id}.php           2 author-{id}.php         2 archive.php

 3 category.php             3 tag.php                3 author.php              3 index.php

 4 archive.php              4 archive.php            4 archive.php

 5 index.php                5 index.php              5 index.php

           Custom Post Type
                Pages
                         1 archive-{post-type}.php

                         2 archive.php

                         3 index.php
1
                              Category Pages from Tag Pages




Why learn this?               2   Category from Category




                              3
Differentiate Content Types
                                  Category from Pages




                              4   Pages
Questions?
THANKS
                   Contact
             Email- al@wpteach.com

              Twitter- @adavis3105


 FOR YOUR
 ATTENTION

More Related Content

PPTX
WordPress Theme Development
PDF
Introduction to WordPress Theme Development
PDF
Cms & wordpress theme development 2011
PDF
WordPress Theme Development
PDF
Intro to WordPress theme development
PDF
WordPress Security Best Practices 2019 Update
PPTX
WordPress Optimization & Security - ThinkVisibility 2012, Leeds
PPTX
WordPress Theme Development: Part 2
WordPress Theme Development
Introduction to WordPress Theme Development
Cms & wordpress theme development 2011
WordPress Theme Development
Intro to WordPress theme development
WordPress Security Best Practices 2019 Update
WordPress Optimization & Security - ThinkVisibility 2012, Leeds
WordPress Theme Development: Part 2

What's hot (20)

PDF
WordPress Theme Structure
KEY
Intro to template hierarchy WCTO
PDF
Theming 101
PDF
Using Custom Post Types and Advanced Custom Fields with Elementor
PPT
Word press interview question and answer tops technologies
PDF
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
PPTX
Build a WordPress theme from HTML5 template @ Telerik
PPTX
Theme development essentials columbus oh word camp 2012
PDF
WordPress Template Hierarchy
PPTX
Presentation to SAIT Students - Dec 2013
PPTX
WordPress Structure and Best Practices
KEY
CrowdFusion: The Front-End Edition, Part I: Presentation Layer
PPTX
Shortcodes vs Widgets: Which one and how?
PPTX
The Way to Theme Enlightenment
PPTX
Custom WordPress theme development
PPTX
WordPress Template hierarchy
PPTX
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
PDF
WordPress Theme Development for Designers
PDF
Arizona WP - Building a WordPress Theme
PDF
Sanjip Shah: Internationalizing and Localizing WordPress Themes
WordPress Theme Structure
Intro to template hierarchy WCTO
Theming 101
Using Custom Post Types and Advanced Custom Fields with Elementor
Word press interview question and answer tops technologies
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Build a WordPress theme from HTML5 template @ Telerik
Theme development essentials columbus oh word camp 2012
WordPress Template Hierarchy
Presentation to SAIT Students - Dec 2013
WordPress Structure and Best Practices
CrowdFusion: The Front-End Edition, Part I: Presentation Layer
Shortcodes vs Widgets: Which one and how?
The Way to Theme Enlightenment
Custom WordPress theme development
WordPress Template hierarchy
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress Theme Development for Designers
Arizona WP - Building a WordPress Theme
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Ad

Viewers also liked (15)

PPTX
Wordpress beyond the blog
PPT
Jenny Clucas
PPTX
Emiliano Duch
PPT
Dan Licari & David Furmage
PPT
New user guide
PPTX
Jessica Michelson
PPTX
Cluster Manager's Election
PPT
Why use wordpress- ACP
KEY
Actions filters
PPT
WordPress Multisite at WordCamp Columbus by Angie Meeker
PPTX
2014 WordCamp Columbus - Dealing with a lockout
PDF
Wc boston
PPTX
Largo Project: A Responsive WordPress Framework For News Sites
PPTX
WordPress Rest API
PPTX
2016 WordCamp Pittsburgh - Let's Write a Plugin
Wordpress beyond the blog
Jenny Clucas
Emiliano Duch
Dan Licari & David Furmage
New user guide
Jessica Michelson
Cluster Manager's Election
Why use wordpress- ACP
Actions filters
WordPress Multisite at WordCamp Columbus by Angie Meeker
2014 WordCamp Columbus - Dealing with a lockout
Wc boston
Largo Project: A Responsive WordPress Framework For News Sites
WordPress Rest API
2016 WordCamp Pittsburgh - Let's Write a Plugin
Ad

Similar to Template hierarchy -WordCamp Columbus (20)

PPT
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
DOC
Wordpress(css,php,js,ajax)
PDF
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
PPTX
Learning Wordpress - the internal guide
PDF
Word Press Help Sheet
PDF
Wordpress for Dummies
KEY
WordPress Bootcamp Part 3 - Themes
KEY
Dev Theming
KEY
Theme Development from the Coding End
PPTX
Part1 learn thelingo
PDF
PDF
WordPress Beginners Workshop
PDF
WordPress Theme Workshop: Part 2
PPT
Internet Librarian Slides
PPT
Emkane RCC wp qs
PPTX
Word press training
PPTX
Wp nhcc portfolio
PPTX
Wordpress for beginners
PPTX
WordPress 101
PDF
WordPress for Business Owners
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
Wordpress(css,php,js,ajax)
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Learning Wordpress - the internal guide
Word Press Help Sheet
Wordpress for Dummies
WordPress Bootcamp Part 3 - Themes
Dev Theming
Theme Development from the Coding End
Part1 learn thelingo
WordPress Beginners Workshop
WordPress Theme Workshop: Part 2
Internet Librarian Slides
Emkane RCC wp qs
Word press training
Wp nhcc portfolio
Wordpress for beginners
WordPress 101
WordPress for Business Owners

More from Al Davis (13)

PDF
Word camp Toronto 2017
PDF
Montreal word camp 2017
PPTX
Ecomm 101
PDF
Wcto2014
PDF
Managing Multiple Authors with WordPress
PPTX
After the install
PPT
Wcto2012- after the install
PPTX
WordCamp Atlanta- Shared Hosting and WordPress
PPT
10 things to do after the install- WordCamp Victoria 2012
PPTX
Sharedhosting and WordPress
PPTX
Shared Hosting and WordPress
PPT
Onlinehub chicago- ACP
PPTX
Hosting provider
Word camp Toronto 2017
Montreal word camp 2017
Ecomm 101
Wcto2014
Managing Multiple Authors with WordPress
After the install
Wcto2012- after the install
WordCamp Atlanta- Shared Hosting and WordPress
10 things to do after the install- WordCamp Victoria 2012
Sharedhosting and WordPress
Shared Hosting and WordPress
Onlinehub chicago- ACP
Hosting provider

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Review of recent advances in non-invasive hemoglobin estimation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MIND Revenue Release Quarter 2 2025 Press Release
Review of recent advances in non-invasive hemoglobin estimation
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?

Template hierarchy -WordCamp Columbus

  • 1. July 14 WordCamp Columbus WordPress Template Hierarchy Presented by Al Davis- WPTeach.com
  • 2. WordCamp Developers Toronto WordPress Developers Who’s Toronto TELUS SMB ‘Portal God’ Al the bald Freelance Developer Davi s WordCamp Toronto guy? Owner-wpteach.com Toronto WordPress College Professor Meetup Intro to WordPress Intro to WordPress Theme and Plugin Development
  • 3. The What file(s) does WordPress use when it Question displays a certain type of page?
  • 5. header.php Lets sidebar.php start with the The Loop basics footer.php
  • 6. A working index.php + style.css = theme A very basic but functional theme needs:
  • 7. So what is with all of this then? A: Different looks for different types of content
  • 8. Home Page Display Rules 1 home.php 2 index.php
  • 9. 1 front-page.php This is used for displaying your latest posts or a static page as defined in Settings > Reading 2 Front or Home page Page Display Rules When you set the Front page in Settings> Reading 3 Home Page Display Rules When posts page is set in the Front Page displays section of Settings> Reading
  • 10. 1 Custom Template File The page template assigned to the page <?php /* Template Name: Whatever you call your template*/ ?> 2 page-{slug}.php if you use the slug “ bananas” WordPress will look for page- bananas.php Page Display Rules 3 page-{id}.php if the page ID is 4, Wordpress looks to use page-4.php 4 page.php 5 index.php
  • 11. Singular Page 1 Single Post Page 2 Static page
  • 12. 1 Attachment post Singlular page Single post 2 Custom Post 3 Blog post
  • 13. MIME-type.php 1 It can be any MIME type ( video.php, image.php, etc) for text/plain in order: 3.text.php 4.plain.php 5.text_plain.php Singular Post 2 attachment.php Single Post- Attachment 3 single-attachment.php 4 single.php 5 index.php
  • 14. 1 single-{posttype}.php if post type was “movies”, WordPress would look for single-movies.php Singular Post Single Post- Custom Post 2 single.php 3 index.php
  • 15. 1 single-post.php Singular Post Single Post- Blog Post 2 single.php 3 index.php
  • 16. 1 Custom Template File The page template assigned to the page <?php /* Template Name: Whatever you call your template*/ ?> 2 page-{slug}.php if you use the slug “ bananas” WordPress will look for page- bananas.php Singular Page Static page- aka 3 page-{id}.php if the page ID is 4, Wordpress looks to use page-4.php “ Page Display Rules” 4 page.php 5 index.php
  • 17. 1 Post Pages Category Pages Tag Pages Custom Post Types Archive Pages 2 Author Pages 3 Date Pages
  • 18. ategory Pages Pages Tag 1 Date Pages Author Pages 1 category-{slug}.php 1 tag-{slug}.php 1 author-{nicename}.php 1 date.php 2 category-{id}.php 2 tag-{id}.php 2 author-{id}.php 2 archive.php 3 category.php 3 tag.php 3 author.php 3 index.php 4 archive.php 4 archive.php 4 archive.php 5 index.php 5 index.php 5 index.php Custom Post Type Pages 1 archive-{post-type}.php 2 archive.php 3 index.php
  • 19. 1 Category Pages from Tag Pages Why learn this? 2 Category from Category 3 Differentiate Content Types Category from Pages 4 Pages
  • 21. THANKS Contact Email- al@wpteach.com Twitter- @adavis3105 FOR YOUR ATTENTION