SlideShare a Scribd company logo
1 of 19
WordPress Theming
Custom Pages, Custom Post Types, & Custom Fields




                 Lori Berkowitz
              http://beedragon.com
Overview
•   The Codex ♥

• Template Tags/
    Template Hierarchy

• The Loop
• Custom Loops /
    Multiple Loops

• Custom Fields
• Custom Post Types
WordPress Codex

• http://codex.wordpress.org
• /Template_Tags
• /Conditional_Tags
• /Include_tags
• /Function_Reference
Child Themes
•   Separate template folder than parent theme
•   Uses parent theme files unless overridden
•   Must have a style.css file
    /*
    Theme Name: awesome
    Theme URI: http: //beedragon.com/
    Description: awesome child theme for twentyten
    Author: Lori B
    Author URI: http: //lbnuke.com/
    Template: twentyten
    Version: 1.0
    */
    @import url('../twentyten/style.css'); /* import parent styles */

    Parent themes: twentyten, Thematic, Hybrid, Genesis*, Thesis*
    ( * Commercial Theme )
Include Tags
          Work like PHP include() statements

•   <?php get_header(); ?>          Includes header.php

•   <?php get_sidebar(); ?>         Includes sidebar.php

•   <?php get_footer(); ?>          Includes footer.php

•   <?php get_search_form() ?>      Includes searchform.php

•   <?php comments_template(); ?>   Includes comments.php
Conditional Tags
•   is_home()          Main blog page

•   is_front_page()    Front page from Settings > Reading

•   is_single()        Single post page

•   is_sticky()        Returns true if sticky box is checked

•   is_page()          A "page" page

•   is_category()      Category archive page

•   is_author()        Author page

•   is_404()           HTTP 404: Not Found error page
Tag Parameters
       For template tags, conditional
           tags, include tags, etc.

                    Examples:

is_page( '19' ) Page with ID 19
is_page( 'about' ) About page (slug)
is_page( 'About Me' ) About page (post title)
is_page ( array( 19, 'about', 'Contact Us' ) )
Returns true when displayed page is either post ID 19
OR post_name "about-me" OR post_title "Contact Us"
Conditional Tag with a Parameter
 Add CSS class to posts in Category 3 only:
Example Post Code
Template Hierarchy
Home:             Search:            404:
• home.php        • search.php        • 404.php
• index.php       • index.php         • index.php

Post:            Page:             Category:
• single-        • pagename.php    • category-slug.php
  posttype.php   • page-slug.php   • category-id.php
• single.php     • page-id.php     • category.php
• index.php      • page.php        • archive.php
                 • index.php       • index.php
The Loop
The Loop displays WordPress posts.
query_posts();
 Query the WP database for pet posts:
 Before the Loop: query_posts( 'post_type = pets' );




The query_posts function is intended to be used to
modify the main page Loop only.
Pets
Page
Multiple Loops: wp_query();




          <!-- Start the default loop -->
Custom Fields
dob



Display the
custom fields



   dob
Custom
 Post
 Type
Questions?

More Related Content

What's hot

WordPress
WordPressWordPress
WordPressrisager
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
TERMINALFOUR t44u 2011- Did you know - CMS and live search
TERMINALFOUR t44u 2011- Did you know - CMS and live searchTERMINALFOUR t44u 2011- Did you know - CMS and live search
TERMINALFOUR t44u 2011- Did you know - CMS and live searchTerminalfour
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsAmanda Giles
 
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
 
Making drupal beautiful with web fonts
Making drupal beautiful with web fontsMaking drupal beautiful with web fonts
Making drupal beautiful with web fontsFour Kitchens
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme DevelopmentSantosh Kunwar
 
Using JSLink and Display Temlates with the LVWP
Using JSLink and Display Temlates with the LVWPUsing JSLink and Display Temlates with the LVWP
Using JSLink and Display Temlates with the LVWPSPC Adriatics
 
ActiveRecord Association (1), Season 2
ActiveRecord Association (1), Season 2ActiveRecord Association (1), Season 2
ActiveRecord Association (1), Season 2RORLAB
 

What's hot (10)

WordPress
WordPressWordPress
WordPress
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
TERMINALFOUR t44u 2011- Did you know - CMS and live search
TERMINALFOUR t44u 2011- Did you know - CMS and live searchTERMINALFOUR t44u 2011- Did you know - CMS and live search
TERMINALFOUR t44u 2011- Did you know - CMS and live search
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
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
 
Making drupal beautiful with web fonts
Making drupal beautiful with web fontsMaking drupal beautiful with web fonts
Making drupal beautiful with web fonts
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
Using JSLink and Display Temlates with the LVWP
Using JSLink and Display Temlates with the LVWPUsing JSLink and Display Temlates with the LVWP
Using JSLink and Display Temlates with the LVWP
 
ActiveRecord Association (1), Season 2
ActiveRecord Association (1), Season 2ActiveRecord Association (1), Season 2
ActiveRecord Association (1), Season 2
 
Creating forms
Creating formsCreating forms
Creating forms
 

Viewers also liked

Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...
Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...
Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...Healthcare consultant
 
Covering letter for maeve
Covering letter for maeveCovering letter for maeve
Covering letter for maeveHughmcginey
 
How To Plan for, Design, and Implement a Communications Dashboard
How To Plan for, Design, and Implement a Communications DashboardHow To Plan for, Design, and Implement a Communications Dashboard
How To Plan for, Design, and Implement a Communications DashboardPaine Publishing
 
Service Design Methoden für Plattformen
Service Design Methoden für PlattformenService Design Methoden für Plattformen
Service Design Methoden für PlattformenKatrin Mathis
 
EndocH Inc ISO 13485 Certificate
EndocH Inc ISO 13485 CertificateEndocH Inc ISO 13485 Certificate
EndocH Inc ISO 13485 CertificateEndocH Inc
 
BENEFITS OF USING INTERNET AND WEB ACCESS IN EDUCATION
BENEFITS OF USING INTERNET AND  WEB ACCESS IN EDUCATIONBENEFITS OF USING INTERNET AND  WEB ACCESS IN EDUCATION
BENEFITS OF USING INTERNET AND WEB ACCESS IN EDUCATIONNicolas Jaaar
 
Animated service blueprint
Animated service blueprintAnimated service blueprint
Animated service blueprintSagar Paul
 
Curso online principios fundamentales de la bioetica
Curso online principios fundamentales de la bioeticaCurso online principios fundamentales de la bioetica
Curso online principios fundamentales de la bioeticaiLabora
 
dando-retroalimentacion-efectiva
dando-retroalimentacion-efectivadando-retroalimentacion-efectiva
dando-retroalimentacion-efectivaCesar Rodriguez
 
EXAMEN CONTESTADO DE FC y E
EXAMEN CONTESTADO DE FC y EEXAMEN CONTESTADO DE FC y E
EXAMEN CONTESTADO DE FC y Ealumnosbine
 
1. Simulacro de examen subprueba conocimientos pedagógicos 2015
1. Simulacro de examen subprueba conocimientos pedagógicos 20151. Simulacro de examen subprueba conocimientos pedagógicos 2015
1. Simulacro de examen subprueba conocimientos pedagógicos 2015Julio Najarro Laura
 
Presentaciones GS1 University. Aguascalientes, 2016.
Presentaciones GS1 University. Aguascalientes, 2016.Presentaciones GS1 University. Aguascalientes, 2016.
Presentaciones GS1 University. Aguascalientes, 2016.GS1 México
 

Viewers also liked (20)

Total qulity management
Total qulity managementTotal qulity management
Total qulity management
 
Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...
Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...
Honorary Adviser for Healthcare Quality Accreditation CIAC --Confederation of...
 
CoA C 2-12 Bosnia
CoA C 2-12 BosniaCoA C 2-12 Bosnia
CoA C 2-12 Bosnia
 
Covering letter for maeve
Covering letter for maeveCovering letter for maeve
Covering letter for maeve
 
How To Plan for, Design, and Implement a Communications Dashboard
How To Plan for, Design, and Implement a Communications DashboardHow To Plan for, Design, and Implement a Communications Dashboard
How To Plan for, Design, and Implement a Communications Dashboard
 
Owners
OwnersOwners
Owners
 
Employment
EmploymentEmployment
Employment
 
La salud
La saludLa salud
La salud
 
Android
AndroidAndroid
Android
 
Service Design Methoden für Plattformen
Service Design Methoden für PlattformenService Design Methoden für Plattformen
Service Design Methoden für Plattformen
 
Administracion
AdministracionAdministracion
Administracion
 
EndocH Inc ISO 13485 Certificate
EndocH Inc ISO 13485 CertificateEndocH Inc ISO 13485 Certificate
EndocH Inc ISO 13485 Certificate
 
BENEFITS OF USING INTERNET AND WEB ACCESS IN EDUCATION
BENEFITS OF USING INTERNET AND  WEB ACCESS IN EDUCATIONBENEFITS OF USING INTERNET AND  WEB ACCESS IN EDUCATION
BENEFITS OF USING INTERNET AND WEB ACCESS IN EDUCATION
 
Animated service blueprint
Animated service blueprintAnimated service blueprint
Animated service blueprint
 
Curso online principios fundamentales de la bioetica
Curso online principios fundamentales de la bioeticaCurso online principios fundamentales de la bioetica
Curso online principios fundamentales de la bioetica
 
dando-retroalimentacion-efectiva
dando-retroalimentacion-efectivadando-retroalimentacion-efectiva
dando-retroalimentacion-efectiva
 
EXAMEN CONTESTADO DE FC y E
EXAMEN CONTESTADO DE FC y EEXAMEN CONTESTADO DE FC y E
EXAMEN CONTESTADO DE FC y E
 
CAMBIO ORGANIZACIONAL
CAMBIO ORGANIZACIONALCAMBIO ORGANIZACIONAL
CAMBIO ORGANIZACIONAL
 
1. Simulacro de examen subprueba conocimientos pedagógicos 2015
1. Simulacro de examen subprueba conocimientos pedagógicos 20151. Simulacro de examen subprueba conocimientos pedagógicos 2015
1. Simulacro de examen subprueba conocimientos pedagógicos 2015
 
Presentaciones GS1 University. Aguascalientes, 2016.
Presentaciones GS1 University. Aguascalientes, 2016.Presentaciones GS1 University. Aguascalientes, 2016.
Presentaciones GS1 University. Aguascalientes, 2016.
 

Similar to Theme Development from the Coding End

The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012Stephanie Leary
 
What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)Stephanie Leary
 
Carrington Core (2014)
Carrington Core (2014)Carrington Core (2014)
Carrington Core (2014)alexkingorg
 
The Genesis Framework: Hooks & Filters for Theme Development
The Genesis Framework: Hooks & Filters for Theme DevelopmentThe Genesis Framework: Hooks & Filters for Theme Development
The Genesis Framework: Hooks & Filters for Theme DevelopmentSarah Moyer
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme DevelopmentBijay Oli
 
Builing a WordPress Theme
Builing a WordPress ThemeBuiling a WordPress Theme
Builing a WordPress Themecertainstrings
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress themeDave Wallace
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Themecertainstrings
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
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
 
How does get template part works in twenty ten theme
How does get template part works in twenty ten themeHow does get template part works in twenty ten theme
How does get template part works in twenty ten thememohd rozani abd ghani
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPressNisha Singh
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Curtiss Grymala
 
WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2David Bisset
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme SurgeryRational Frank
 
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 Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3David Bisset
 

Similar to Theme Development from the Coding End (20)

The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
 
What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)What's New in WordPress 3.0 (for developers)
What's New in WordPress 3.0 (for developers)
 
Carrington Core (2014)
Carrington Core (2014)Carrington Core (2014)
Carrington Core (2014)
 
The Genesis Framework: Hooks & Filters for Theme Development
The Genesis Framework: Hooks & Filters for Theme DevelopmentThe Genesis Framework: Hooks & Filters for Theme Development
The Genesis Framework: Hooks & Filters for Theme Development
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
 
Builing a WordPress Theme
Builing a WordPress ThemeBuiling a WordPress Theme
Builing a WordPress Theme
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
WordPress theme template tour
WordPress theme template tourWordPress theme template tour
WordPress theme template tour
 
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
 
How does get template part works in twenty ten theme
How does get template part works in twenty ten themeHow does get template part works in twenty ten theme
How does get template part works in twenty ten theme
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPress
 
Theming 101
Theming 101Theming 101
Theming 101
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
 
WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2WordPress Theme Workshop: Part 2
WordPress Theme Workshop: Part 2
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme Surgery
 
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 Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 

More from East Bay WordPress Meetup

How to Develop a Color Palette for Your Website with Amanada McCoy
How to Develop a Color Palette for Your Website with Amanada McCoyHow to Develop a Color Palette for Your Website with Amanada McCoy
How to Develop a Color Palette for Your Website with Amanada McCoyEast Bay WordPress Meetup
 
Beyond Gravity Forms: Form Plugins for WordPress
Beyond Gravity Forms: Form Plugins for WordPressBeyond Gravity Forms: Form Plugins for WordPress
Beyond Gravity Forms: Form Plugins for WordPressEast Bay WordPress Meetup
 
Git Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeGit Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeEast Bay WordPress Meetup
 
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegSallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegEast Bay WordPress Meetup
 
Rob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegRob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegEast Bay WordPress Meetup
 
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsAdvanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsEast Bay WordPress Meetup
 
Introduction to Google Analytics by Katherine Mancuso
Introduction to Google Analytics by Katherine MancusoIntroduction to Google Analytics by Katherine Mancuso
Introduction to Google Analytics by Katherine MancusoEast Bay WordPress Meetup
 
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
iThemes Exchange: the New Kid on the WordPress E-Commerce BlockiThemes Exchange: the New Kid on the WordPress E-Commerce Block
iThemes Exchange: the New Kid on the WordPress E-Commerce BlockEast Bay WordPress Meetup
 
What Developers Need Designers to Know about WordPress
What Developers Need Designers to Know about WordPressWhat Developers Need Designers to Know about WordPress
What Developers Need Designers to Know about WordPressEast Bay WordPress Meetup
 

More from East Bay WordPress Meetup (20)

How to Conduct an SEO Audit
How to Conduct an SEO AuditHow to Conduct an SEO Audit
How to Conduct an SEO Audit
 
WordPress Membership Plugins: WP-Members
WordPress Membership Plugins: WP-MembersWordPress Membership Plugins: WP-Members
WordPress Membership Plugins: WP-Members
 
WordPress Membership Plugins: MemberPress
WordPress Membership Plugins: MemberPress WordPress Membership Plugins: MemberPress
WordPress Membership Plugins: MemberPress
 
How to Develop a Color Palette for Your Website with Amanada McCoy
How to Develop a Color Palette for Your Website with Amanada McCoyHow to Develop a Color Palette for Your Website with Amanada McCoy
How to Develop a Color Palette for Your Website with Amanada McCoy
 
Event Management Plugins for WordPress
Event Management Plugins for WordPressEvent Management Plugins for WordPress
Event Management Plugins for WordPress
 
Beyond Gravity Forms: Form Plugins for WordPress
Beyond Gravity Forms: Form Plugins for WordPressBeyond Gravity Forms: Form Plugins for WordPress
Beyond Gravity Forms: Form Plugins for WordPress
 
Is Your (Client's) Website Ready for 2017?
Is Your (Client's) Website Ready for 2017?Is Your (Client's) Website Ready for 2017?
Is Your (Client's) Website Ready for 2017?
 
Git Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeGit Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBarge
 
Making WordPress Easier to Use
Making WordPress Easier to UseMaking WordPress Easier to Use
Making WordPress Easier to Use
 
WordPress Comments (November Meetup)
WordPress Comments (November Meetup)WordPress Comments (November Meetup)
WordPress Comments (November Meetup)
 
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegSallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
 
Rob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegRob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and Beg
 
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating LimitationsAdvanced Custom Fields: Amazing Possibilities and Irritating Limitations
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
 
March 2015: Plugins Worth Paying For
March 2015: Plugins Worth Paying ForMarch 2015: Plugins Worth Paying For
March 2015: Plugins Worth Paying For
 
Google Webmaster Tools for WordPress
Google Webmaster Tools for WordPressGoogle Webmaster Tools for WordPress
Google Webmaster Tools for WordPress
 
Introduction to Google Analytics by Katherine Mancuso
Introduction to Google Analytics by Katherine MancusoIntroduction to Google Analytics by Katherine Mancuso
Introduction to Google Analytics by Katherine Mancuso
 
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
iThemes Exchange: the New Kid on the WordPress E-Commerce BlockiThemes Exchange: the New Kid on the WordPress E-Commerce Block
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
 
Running a WordPress Business--Some Numbers
Running a WordPress Business--Some NumbersRunning a WordPress Business--Some Numbers
Running a WordPress Business--Some Numbers
 
What Developers Need Designers to Know about WordPress
What Developers Need Designers to Know about WordPressWhat Developers Need Designers to Know about WordPress
What Developers Need Designers to Know about WordPress
 
Making WordPress Fly
Making WordPress FlyMaking WordPress Fly
Making WordPress Fly
 

Recently uploaded

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
#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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Recently uploaded (20)

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 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
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

Theme Development from the Coding End

  • 1. WordPress Theming Custom Pages, Custom Post Types, & Custom Fields Lori Berkowitz http://beedragon.com
  • 2. Overview • The Codex ♥ • Template Tags/ Template Hierarchy • The Loop • Custom Loops / Multiple Loops • Custom Fields • Custom Post Types
  • 3. WordPress Codex • http://codex.wordpress.org • /Template_Tags • /Conditional_Tags • /Include_tags • /Function_Reference
  • 4. Child Themes • Separate template folder than parent theme • Uses parent theme files unless overridden • Must have a style.css file /* Theme Name: awesome Theme URI: http: //beedragon.com/ Description: awesome child theme for twentyten Author: Lori B Author URI: http: //lbnuke.com/ Template: twentyten Version: 1.0 */ @import url('../twentyten/style.css'); /* import parent styles */ Parent themes: twentyten, Thematic, Hybrid, Genesis*, Thesis* ( * Commercial Theme )
  • 5. Include Tags Work like PHP include() statements • <?php get_header(); ?> Includes header.php • <?php get_sidebar(); ?> Includes sidebar.php • <?php get_footer(); ?> Includes footer.php • <?php get_search_form() ?> Includes searchform.php • <?php comments_template(); ?> Includes comments.php
  • 6. Conditional Tags • is_home() Main blog page • is_front_page() Front page from Settings > Reading • is_single() Single post page • is_sticky() Returns true if sticky box is checked • is_page() A "page" page • is_category() Category archive page • is_author() Author page • is_404() HTTP 404: Not Found error page
  • 7. Tag Parameters For template tags, conditional tags, include tags, etc. Examples: is_page( '19' ) Page with ID 19 is_page( 'about' ) About page (slug) is_page( 'About Me' ) About page (post title) is_page ( array( 19, 'about', 'Contact Us' ) ) Returns true when displayed page is either post ID 19 OR post_name "about-me" OR post_title "Contact Us"
  • 8. Conditional Tag with a Parameter Add CSS class to posts in Category 3 only:
  • 10. Template Hierarchy Home: Search: 404: • home.php • search.php • 404.php • index.php • index.php • index.php Post: Page: Category: • single- • pagename.php • category-slug.php posttype.php • page-slug.php • category-id.php • single.php • page-id.php • category.php • index.php • page.php • archive.php • index.php • index.php
  • 11. The Loop The Loop displays WordPress posts.
  • 12. query_posts(); Query the WP database for pet posts: Before the Loop: query_posts( 'post_type = pets' ); The query_posts function is intended to be used to modify the main page Loop only.
  • 14. Multiple Loops: wp_query(); <!-- Start the default loop -->
  • 18.

Editor's Notes