SlideShare una empresa de Scribd logo
1 de 90
improving
   theme
development
  JASON DAVID PELKER
  ITEM-9.COM @JPELKER
THEME STANDARDS
 THEME STANDARDS
  THEME STANDARDS
THEME STANDARDS
THEME STANDARDS
    THEME
From where has
WordPress come?
What about
 themes?
What grinds
 my gears?
What grinds
 my gears?
#1
   LIMITED
MODULARIZATION
“Have you ever wanted to
change a class in the loop?
You’re likely going to have
   to edit upwards of five
files. The worst part? Most
of the code you’re editing
        is identical.”

                  Daryl Koopersmith
“Separate Theme
 Structure from
Theme Content!”
get_template_part
$slug: (required) The slug
name for the generic template.

$name: (optional) The name of
the specialized template.
Show me...
loop.php
Show me...
loop-author.php
Show me...
loop-cat.php
TwentyTen
•   In archive.php: get_template_part('loop','archive');

•   In author.php: get_template_part('loop','author');

•   In category.php:
    get_template_part('loop','category');

•   In index.php: get_template_part('loop','index');

•   In search.php: get_template_part('loop','search');

•   In tag.php: get_template_part('loop','tag');
What’s the
   problem with
get_template_part?
The burden is on
     the user to
   implement the
template hierarchy.
No naming
conventions.

  loop-cat vs.
loop-category?
Daryl Koopersmith
“Separate the
 F*cking Theme
 Structure from
Theme Content!”
get_template_module
TwentyTen
get_template_module
 loads the first match
<?php get_template_module('loop');?>
In the
 folder
“loop”...
loop/category-news.php →
 loop/category-4.php →
  loop/category.php →
   loop/archive.php →
     loop/index.php
more reading

http://drylk.com/2010/04/06/modular-themes-organization/

                         or
        http://bit.ly/czxWT3
What grinds
 my gears?
#2
POOR NAMING
CONVENTIONS
BuddyPress
theSevenFive
By default BuddyPress templates
    use this HTML structure:
BuddyPress Template Pack
BuddyPress vs. TwentyTen
BuddyPress   TwentyTen
Before
After
3 DIVs
•container
• content
• sidebar
No div id=“container”
3 DIVs
•container
• content
• sidebar
HTML 5
Global Tags
•   header
•   section
•   article
•   nav
•   footer
CSS 3

  Multiple
Backgrounds
What grinds
 my gears?
#3
  REPETITIVE
THEME OPTIONS
“Originally themes were
   designs. Then they
 became designs with
  functions stuck on.”
               Alex Denning,
                 WPShout
Already Built-in
•   header image
•   Woo navigation
•   custom background
Other ideas

•   post thumbnails
•   custom post types
What else?
•   PageNavi
•   breadcrumbs
•   advanced SEO
•   analytics
•   favicon
•   FeedBurner
•   date formatting
•   Twitter
•   author box
•   timthumb
•   featured slider
•   common layouts
Can a brotha
export some
  options?
Prevent
unwieldiness?
Collections
Core Plugins
•   importer/exporter
•   navigation
“Sure, there are some
 limitations with this
   system. With a set
standard, new plugins
 will likely emerge to
    fill in the gaps.”
                Justin Tadlock
THEME
CREATIVITY
   IS...
CONTENT
+ DESIGN
THEME
EFFICIENCY
    IS...
MODULARIZATION
         +
NAMING CONVENTIONS
         +
 STANDARD OPTIONS
THEME STANDARDS
 THEME STANDARDS
  THEME STANDARDS
THEME STANDARDS
THEME STANDARDS
    THEME
improving
   theme
development
  JASON DAVID PELKER
  ITEM-9.COM @JPELKER
Improving WordPress Theme Development through Standardization

Más contenido relacionado

Destacado

Destacado (11)

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
 
Theme development mac
Theme development macTheme development mac
Theme development mac
 
Theme Development
Theme DevelopmentTheme Development
Theme Development
 
Better WordPress Theme Development Workflow
Better WordPress Theme Development WorkflowBetter WordPress Theme Development Workflow
Better WordPress Theme Development Workflow
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
 
Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012Best Practices in Theme Development - WordCamp Orlando 2012
Best Practices in Theme Development - WordCamp Orlando 2012
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme development
 
MSP Development Theme
MSP Development ThemeMSP Development Theme
MSP Development Theme
 
WordPress Theme Development Basics
WordPress Theme Development BasicsWordPress Theme Development Basics
WordPress Theme Development Basics
 

Último

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
Safe Software
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Improving WordPress Theme Development through Standardization

Notas del editor

  1. What does Daryl suggest to do? &amp;#x201C;Separate Theme Structure from Theme Content!&amp;#x201D;
  2. Here&amp;#x2019;s a loop
  3. Here&amp;#x2019;s Twenty Ten with the modules stripped out; header, content, footer.
  4. If were in the news category archive page...
  5. But, it&amp;#x2019;s not perfect...
  6. Alex Denning
  7. war of attrition
  8. Other examples of WordPress sniped code?
  9. More Fields, Flutter, Pods
  10. More Fields, Flutter, Pods