• Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Parent/Child Themes vs. Theme Frameworks

  • 4,900 views
Published

I spoke at WordCamp Las Vegas about using theme frameworks and parent/child theme concepts to make custom themes.

I spoke at WordCamp Las Vegas about using theme frameworks and parent/child theme concepts to make custom themes.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
4,900
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
60
Comments
2
Likes
10

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide




























Transcript

  • 1. parent/child themes vs. theme frameworks @brandondove #wclv
  • 2. parent/child themes
  • 3. “parent” themes are... • any theme created by anyone • no specific coding requirements /* Theme Name: Traction Theme URI: http://thethemefoundry.com/traction/ Description: A super clean magazine theme featuring built-in post thumbnail support, a featured post slider, and a robust theme options menu. Version: 1.02 Author: The Theme Foundry Author URI: http://thethemefoundry.com/ Tags: fixed-width, two-columns, dark, black, blue, red, green, right-sidebar, threaded-comments, theme-options, translation-ready */
  • 4. “child” themes are... • a subset of modifications • only requirement is style.css /* Theme Name: Traction PRO Child Theme Theme URI: http://thethemefoundry.com/traction/ Description: PRO child theme for Traction. Version: 1.02 Author: The Theme Foundry Author URI: http://thethemefoundry.com/ Template: traction */
  • 5. parent/child theme relationships
  • 6. parent/child theme relationships
  • 7. parent/child theme relationships
  • 8. parent/child theme relationships
  • 9. parent/child theme relationships
  • 10. the importance of child themes... • you don’t have to reinvent the wheel • change only what you need • theoretically protects your modifications from updates
  • 11. basic parent/child theme concepts • load parent theme css • override templates to change layouts • functions.php does not get overridden
  • 12. parent theme folder structure child theme folder structure
  • 13. theme framework = supercharged parent theme • for developers, not average WordPress users • use actions to allow child themes to execute code • use filters to allow child themes to modify output • actions/filters are what make WordPress REALLY awesome
  • 14. theme framework actions • placeholders for you to insert code without hacking the framework • in the framework: do_action( 'before_thematic', $args ); • in your child theme (functions.php): add_action( 'before_thematic', 'childtheme_function', (int) priority, (int) arguments ); function childtheme_function( $args ) { // execute some code here }
  • 15. theme framework filters • allow you to alter the output of custom framework functions • in the framework: echo apply_filters( 'parenttheme_filter', $args ); • in your child theme (functions.php): add_filter( 'parenttheme_filter', 'childtheme_filter', (int) priority, (int) arguments ); function childtheme_filter( $args ) { return htmlentities( $args ); }
  • 16. bonus round • theme options page = mini framework • endless layout possibilities through actions/filters
  • 17. why thematic? • Ian Stewart & Chris Goßmann • current version: 0.9.7.7 • awesome seo • 13 default widgetized areas • 85 actions to hook into • 71 ways to filter content
  • 18. thematic examples
  • 19. krochetkids.org
  • 20. rockharbor.org
  • 21. 360commercialre.com
  • 22. collegesomethings.rockharbor.org
  • 23. additional resources • ThemeShaper • op111 themeshaper.com/thematic/guide op111.net/53 • Thematic4you thematic4you.com • Pixel Jar pixeljar.net • Google Code code.google.com/p/thematic • Cheatsheet bluemandala.com/thematic/thematic-structure.html
  • 24. do_action( ‘answer_questions’, $questions );
  • 25. Brandon Dove @brandondove brandon@pixeljar.net (714) 932-5787 http://pixeljar.net