Improving WordPress Theme Development through Standardization
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Improving WordPress Theme Development through Standardization

on

  • 3,586 views

“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.”

“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.”

Statistics

Views

Total Views
3,586
Views on SlideShare
3,492
Embed Views
94

Actions

Likes
3
Downloads
51
Comments
0

2 Embeds 94

http://item-9.com 60
http://www.slideshare.net 34

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • What does Daryl suggest to do? &#x201C;Separate Theme Structure from Theme Content!&#x201D; <br />
  • <br />
  • <br />
  • Here&#x2019;s a loop <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Here&#x2019;s Twenty Ten with the modules stripped out; header, content, footer. <br />
  • <br />
  • <br />
  • <br />
  • If were in the news category archive page... <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • But, it&#x2019;s not perfect... <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Alex Denning <br />
  • <br />
  • <br />
  • <br />
  • war of attrition <br />
  • <br />
  • Other examples of WordPress sniped code? <br />
  • <br />
  • More Fields, Flutter, Pods <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • More Fields, Flutter, Pods <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Improving WordPress Theme Development through Standardization Presentation Transcript

  • 1. improving theme development JASON DAVID PELKER ITEM-9.COM @JPELKER
  • 2. THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME
  • 3. From where has WordPress come?
  • 4. What about themes?
  • 5. What grinds my gears?
  • 6. What grinds my gears?
  • 7. #1 LIMITED MODULARIZATION
  • 8. “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
  • 9. “Separate Theme Structure from Theme Content!”
  • 10. get_template_part
  • 11. $slug: (required) The slug name for the generic template. $name: (optional) The name of the specialized template.
  • 12. Show me...
  • 13. loop.php
  • 14. Show me...
  • 15. loop-author.php
  • 16. Show me...
  • 17. loop-cat.php
  • 18. 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');
  • 19. What’s the problem with get_template_part?
  • 20. The burden is on the user to implement the template hierarchy.
  • 21. No naming conventions. loop-cat vs. loop-category?
  • 22. Daryl Koopersmith
  • 23. “Separate the F*cking Theme Structure from Theme Content!”
  • 24. get_template_module
  • 25. TwentyTen
  • 26. get_template_module loads the first match
  • 27. <?php get_template_module('loop');?>
  • 28. In the folder “loop”...
  • 29. loop/category-news.php → loop/category-4.php → loop/category.php → loop/archive.php → loop/index.php
  • 30. more reading http://drylk.com/2010/04/06/modular-themes-organization/ or http://bit.ly/czxWT3
  • 31. What grinds my gears?
  • 32. #2 POOR NAMING CONVENTIONS
  • 33. BuddyPress
  • 34. theSevenFive
  • 35. By default BuddyPress templates use this HTML structure:
  • 36. BuddyPress Template Pack
  • 37. BuddyPress vs. TwentyTen
  • 38. BuddyPress TwentyTen
  • 39. Before
  • 40. After
  • 41. 3 DIVs •container • content • sidebar
  • 42. No div id=“container”
  • 43. 3 DIVs •container • content • sidebar
  • 44. HTML 5
  • 45. Global Tags • header • section • article • nav • footer
  • 46. CSS 3 Multiple Backgrounds
  • 47. What grinds my gears?
  • 48. #3 REPETITIVE THEME OPTIONS
  • 49. “Originally themes were designs. Then they became designs with functions stuck on.” Alex Denning, WPShout
  • 50. Already Built-in • header image • Woo navigation • custom background
  • 51. Other ideas • post thumbnails • custom post types
  • 52. What else?
  • 53. • PageNavi • breadcrumbs • advanced SEO • analytics • favicon • FeedBurner
  • 54. • date formatting • Twitter • author box • timthumb • featured slider • common layouts
  • 55. Can a brotha export some options?
  • 56. Prevent unwieldiness?
  • 57. Collections
  • 58. Core Plugins • importer/exporter • navigation
  • 59. “Sure, there are some limitations with this system. With a set standard, new plugins will likely emerge to fill in the gaps.” Justin Tadlock
  • 60. THEME CREATIVITY IS...
  • 61. CONTENT + DESIGN
  • 62. THEME EFFICIENCY IS...
  • 63. MODULARIZATION + NAMING CONVENTIONS + STANDARD OPTIONS
  • 64. THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME STANDARDS THEME
  • 65. improving theme development JASON DAVID PELKER ITEM-9.COM @JPELKER