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

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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

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