SlideShare a Scribd company logo
1 of 21
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

What's hot

WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 
Intro to template hierarchy WCTO
Intro to template hierarchy  WCTOIntro to template hierarchy  WCTO
Intro to template hierarchy WCTOAl Davis
 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with ElementorAngela Bowman
 
Word press interview question and answer tops technologies
Word press interview question and answer   tops technologiesWord press interview question and answer   tops technologies
Word press interview question and answer tops technologiesTOPS Technologies
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...LinnAlexandra
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012Joe Querin
 
WordPress Template Hierarchy
WordPress Template HierarchyWordPress Template Hierarchy
WordPress Template HierarchySarah Whinnem
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Think Media Inc.
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practicesmarkparolisi
 
CrowdFusion: The Front-End Edition, Part I: Presentation Layer
CrowdFusion: The Front-End Edition, Part I: Presentation LayerCrowdFusion: The Front-End Edition, Part I: Presentation Layer
CrowdFusion: The Front-End Edition, Part I: Presentation Layergraybill
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Amanda Giles
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme developmentTammy Hart
 
WordPress Template hierarchy
WordPress Template hierarchyWordPress Template hierarchy
WordPress Template hierarchyJason Yingling
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalChandra Prakash Thapa
 
WordPress Theme Development for Designers
WordPress Theme Development for DesignersWordPress Theme Development for Designers
WordPress Theme Development for Designerselliotjaystocks
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Themecertainstrings
 
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Sanjip Shah: Internationalizing and Localizing  WordPress ThemesSanjip Shah: Internationalizing and Localizing  WordPress Themes
Sanjip Shah: Internationalizing and Localizing WordPress Themeswpnepal
 

What's hot (20)

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

Viewers also liked

Wordpress beyond the blog
Wordpress  beyond the blogWordpress  beyond the blog
Wordpress beyond the blogAl Davis
 
New user guide
New user guideNew user guide
New user guideAl Davis
 
Why use wordpress- ACP
Why use wordpress- ACPWhy use wordpress- ACP
Why use wordpress- ACPAl Davis
 
WordPress Multisite at WordCamp Columbus by Angie Meeker
WordPress Multisite at WordCamp Columbus by Angie MeekerWordPress Multisite at WordCamp Columbus by Angie Meeker
WordPress Multisite at WordCamp Columbus by Angie MeekerAngela Meeker
 
2014 WordCamp Columbus - Dealing with a lockout
2014 WordCamp Columbus - Dealing with a lockout2014 WordCamp Columbus - Dealing with a lockout
2014 WordCamp Columbus - Dealing with a lockoutJohn Parkinson
 
Largo Project: A Responsive WordPress Framework For News Sites
Largo Project: A Responsive WordPress Framework For News SitesLargo Project: A Responsive WordPress Framework For News Sites
Largo Project: A Responsive WordPress Framework For News Sitesaschweigert
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest APIBrian Layman
 
2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a PluginBrian Layman
 

Viewers also liked (15)

Wordpress beyond the blog
Wordpress  beyond the blogWordpress  beyond the blog
Wordpress beyond the blog
 
Jenny Clucas
Jenny ClucasJenny Clucas
Jenny Clucas
 
Emiliano Duch
Emiliano DuchEmiliano Duch
Emiliano Duch
 
Dan Licari & David Furmage
Dan Licari & David FurmageDan Licari & David Furmage
Dan Licari & David Furmage
 
New user guide
New user guideNew user guide
New user guide
 
Jessica Michelson
Jessica MichelsonJessica Michelson
Jessica Michelson
 
Cluster Manager's Election
Cluster Manager's ElectionCluster Manager's Election
Cluster Manager's Election
 
Why use wordpress- ACP
Why use wordpress- ACPWhy use wordpress- ACP
Why use wordpress- ACP
 
Actions filters
Actions filtersActions filters
Actions filters
 
WordPress Multisite at WordCamp Columbus by Angie Meeker
WordPress Multisite at WordCamp Columbus by Angie MeekerWordPress Multisite at WordCamp Columbus by Angie Meeker
WordPress Multisite at WordCamp Columbus by Angie Meeker
 
2014 WordCamp Columbus - Dealing with a lockout
2014 WordCamp Columbus - Dealing with a lockout2014 WordCamp Columbus - Dealing with a lockout
2014 WordCamp Columbus - Dealing with a lockout
 
Wc boston
Wc bostonWc boston
Wc boston
 
Largo Project: A Responsive WordPress Framework For News Sites
Largo Project: A Responsive WordPress Framework For News SitesLargo Project: A Responsive WordPress Framework For News Sites
Largo Project: A Responsive WordPress Framework For News Sites
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest API
 
2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin2016 WordCamp Pittsburgh - Let's Write a Plugin
2016 WordCamp Pittsburgh - Let's Write a Plugin
 

Similar to Template hierarchy -WordCamp Columbus

Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guidetom altman
 
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy Md Jahidul Islam
 
WordPress Bootcamp Part 3 - Themes
WordPress Bootcamp Part 3 - ThemesWordPress Bootcamp Part 3 - Themes
WordPress Bootcamp Part 3 - ThemesMetronet
 
WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2David Bisset
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Rakesh Kushwaha
 
Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014Stephanie Eckles
 
Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchyStockton Group
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme developmenthenri_makembe
 
WordPress 3: Leveraging the Shiny New Features
WordPress 3: Leveraging the Shiny New FeaturesWordPress 3: Leveraging the Shiny New Features
WordPress 3: Leveraging the Shiny New FeaturesReggie Nicolay
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
advance theme development
advance theme developmentadvance theme development
advance theme development1amitgupta
 
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know OneWordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know OneLorelle VanFossen
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress themeDave Wallace
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press developmentDavid Wolfpaw
 
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Dissecting WordPress Themes and Page Templates, WordPress Columbus MeetupDissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Dissecting WordPress Themes and Page Templates, WordPress Columbus MeetupAngela Meeker
 

Similar to Template hierarchy -WordCamp Columbus (20)

Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guide
 
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
Dhaka WordPress Meetup 3 - Presentation for Template hierarchy
 
WordPress Bootcamp Part 3 - Themes
WordPress Bootcamp Part 3 - ThemesWordPress Bootcamp Part 3 - Themes
WordPress Bootcamp Part 3 - Themes
 
WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
 
Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014
 
Wordpress template hierarchy
Wordpress template hierarchyWordpress template hierarchy
Wordpress template hierarchy
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme development
 
WordPress 3: Leveraging the Shiny New Features
WordPress 3: Leveraging the Shiny New FeaturesWordPress 3: Leveraging the Shiny New Features
WordPress 3: Leveraging the Shiny New Features
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
advance theme development
advance theme developmentadvance theme development
advance theme development
 
WordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know OneWordPress and PHP - It Takes One to Know One
WordPress and PHP - It Takes One to Know One
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)
 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press development
 
WordPress theme template tour
WordPress theme template tourWordPress theme template tour
WordPress theme template tour
 
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Dissecting WordPress Themes and Page Templates, WordPress Columbus MeetupDissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
 
Theme Development from the Coding End
Theme Development from the Coding EndTheme Development from the Coding End
Theme Development from the Coding End
 
Dev Theming
Dev ThemingDev Theming
Dev Theming
 

More from Al Davis

Word camp Toronto 2017
Word camp Toronto 2017Word camp Toronto 2017
Word camp Toronto 2017Al Davis
 
Montreal word camp 2017
Montreal word camp 2017Montreal word camp 2017
Montreal word camp 2017Al Davis
 
Managing Multiple Authors with WordPress
Managing Multiple Authors with WordPressManaging Multiple Authors with WordPress
Managing Multiple Authors with WordPressAl Davis
 
After the install
After the installAfter the install
After the installAl Davis
 
Wcto2012- after the install
Wcto2012- after the install Wcto2012- after the install
Wcto2012- after the install Al Davis
 
WordCamp Atlanta- Shared Hosting and WordPress
WordCamp Atlanta- Shared Hosting and WordPressWordCamp Atlanta- Shared Hosting and WordPress
WordCamp Atlanta- Shared Hosting and WordPressAl Davis
 
10 things to do after the install- WordCamp Victoria 2012
10 things to do after the install- WordCamp Victoria 201210 things to do after the install- WordCamp Victoria 2012
10 things to do after the install- WordCamp Victoria 2012Al Davis
 
Sharedhosting and WordPress
Sharedhosting and WordPressSharedhosting and WordPress
Sharedhosting and WordPressAl Davis
 
Shared Hosting and WordPress
Shared Hosting and WordPressShared Hosting and WordPress
Shared Hosting and WordPressAl Davis
 
Onlinehub chicago- ACP
Onlinehub  chicago- ACPOnlinehub  chicago- ACP
Onlinehub chicago- ACPAl Davis
 
Hosting provider
Hosting providerHosting provider
Hosting providerAl Davis
 

More from Al Davis (13)

Word camp Toronto 2017
Word camp Toronto 2017Word camp Toronto 2017
Word camp Toronto 2017
 
Montreal word camp 2017
Montreal word camp 2017Montreal word camp 2017
Montreal word camp 2017
 
Ecomm 101
Ecomm 101Ecomm 101
Ecomm 101
 
Wcto2014
Wcto2014Wcto2014
Wcto2014
 
Managing Multiple Authors with WordPress
Managing Multiple Authors with WordPressManaging Multiple Authors with WordPress
Managing Multiple Authors with WordPress
 
After the install
After the installAfter the install
After the install
 
Wcto2012- after the install
Wcto2012- after the install Wcto2012- after the install
Wcto2012- after the install
 
WordCamp Atlanta- Shared Hosting and WordPress
WordCamp Atlanta- Shared Hosting and WordPressWordCamp Atlanta- Shared Hosting and WordPress
WordCamp Atlanta- Shared Hosting and WordPress
 
10 things to do after the install- WordCamp Victoria 2012
10 things to do after the install- WordCamp Victoria 201210 things to do after the install- WordCamp Victoria 2012
10 things to do after the install- WordCamp Victoria 2012
 
Sharedhosting and WordPress
Sharedhosting and WordPressSharedhosting and WordPress
Sharedhosting and WordPress
 
Shared Hosting and WordPress
Shared Hosting and WordPressShared Hosting and WordPress
Shared Hosting and WordPress
 
Onlinehub chicago- ACP
Onlinehub  chicago- ACPOnlinehub  chicago- ACP
Onlinehub chicago- ACP
 
Hosting provider
Hosting providerHosting provider
Hosting provider
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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