Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

WordPress theme frameworks

4,750 views

Published on

An introduction to WordPress Theme Frameworks and Thematic,

Published in: Technology, Business

WordPress theme frameworks

  1. 1. WordPress Theme Frameworks. A Rough Guide. Wordcamp Ireland, 6th March 09.
  2. 2. Eddie Johnston Web Designer / Developer Strandhill, Sligo
  3. 4. What is a Framework? <ul><li>word•press frame•work | w ə rd pres ˈ frām ˌ w ə rk | </li></ul><ul><li>noun </li></ul><ul><li>a theme designed specifically for customising & extending . </li></ul><ul><li>• an excellent foundation for custom theme development. </li></ul><ul><li>• a way to spend less time coding & more time designing. </li></ul><ul><li>ORIGIN c. 2006: Sandbox . (RIP Jan 22 nd , 2010) </li></ul>
  4. 5. What is a Framework?
  5. 6. Analogy ~ a Theme. Looks great. Built with particular functionality. Can be difficult to modify and personalise. Designed as an end product.
  6. 7. Analogy ~ a Framework. Looks drab. Built for multiple usage scenarios. Created with modification in mind.
  7. 8. Analogy ~ a Framework. Designed to be a solid starting point.
  8. 9. How They Work. <ul><li>Act as a starting point . </li></ul><ul><li>Don’t edit Framework files. </li></ul><ul><ul><li>Create a child theme to edit. </li></ul></ul><ul><ul><li>Inherit all functionality & style. </li></ul></ul><ul><li>Just change the parts you need to. </li></ul>
  9. 10. Advantages. <ul><li> Give a great headstart. </li></ul><ul><li> Minimum repetition. </li></ul><ul><li> Consistent code in all projects. </li></ul><ul><li> Core can be easily updated. </li></ul><ul><ul><li>Changes wont be overwritten. </li></ul></ul>
  10. 11. Creating a Framework. /* Theme Name: mychild Template: kubrick */ #headerimg { display:none; } #content .narrowcolumn { width:300px; } style.css function mychild_header_color () { . . . } add_filter( 'kubrick_header_color' , mychild_header_color ); > mkdir mychild; vim mychild/style.css; functions.php 2. Point to the framework. Style as required. 1. Create a child-theme directory and stylesheet. 3. Override specific functionality.
  11. 12. Poor Framework Themes. <ul><li>Most themes are not suitable. </li></ul><ul><ul><li>Markup is too light. </li></ul></ul><ul><ul><li>Functions cant be easily modified. </li></ul></ul>
  12. 13. Poor Framework Themes. Not designed for expansion.
  13. 14. Poor Framework Themes. Changing appearance can be tricky Changing functionality can be a chore
  14. 15. Great Framework Themes. <ul><li>Main characteristics: </li></ul><ul><ul><li>Produce extensive, descriptive markup. </li></ul></ul><ul><ul><li>Provide multiple hooks. </li></ul></ul>
  15. 16. Great Framework Themes. Solid foundations, designed to be built on .
  16. 17. Great Framework Themes. Customising is quick & easy.
  17. 18. Great Framework Themes.
  18. 19. Thematic. <ul><li>An excellent framework. </li></ul><ul><ul><li>Extensive markup. </li></ul></ul><ul><ul><li>Multiple hooks. </li></ul></ul><ul><ul><li>Modular CSS. </li></ul></ul><ul><ul><li>Great Widget functionality. </li></ul></ul><ul><ul><li>Community Developed. </li></ul></ul>
  19. 20. Extensive Markup. <ul><li>Semantic class and id labels. </li></ul><body class= &quot;wordpress y2010 m03 d01 h10 home blog not-singular loggedin mac firefox ff3&quot; > thematic <body class= ”home blog logged-in&quot; > kubrick <ul><li>Good SEO </li></ul><ul><ul><li>nofollow feeds, noindex archives. </li></ul></ul>
  20. 21. Multiple Hooks. <ul><li>150 filters , 60 actions. </li></ul><h3> Title </h3> <h3> <span> Title </span> </h3>
  21. 22. Multiple Hooks. <ul><li>150 filters , 60 actions. </li></ul>function pre_widget_title ( $pre ) { return $pre . '<span>' ; } function post_widget_title ( $post ) { return '</span>' . $post ; } add_filter( 'thematic_before_title' , pre_widget_title ); add_filter( 'thematic_after_title' , post_widget_title ); functions.php <h3> <span> </span> </h3> <h3> </h3>
  22. 23. Multiple Hooks. <ul><li>150 filters, 60 actions . </li></ul><p> Hello World </p>
  23. 24. Multiple Hooks. <ul><li>150 filters, 60 actions . </li></ul>function my_page_access () { ?> <div id= &quot;access&quot; > <div class= &quot;menu&quot; > <ul class= &quot;sf-menu&quot; > <li><a href= &quot;http://perfectpints.com/..&quot; >Find </a></li> <li><a href= &quot;http://perfectpints.com/..&quot; >Craic </a></li> <li><a href= &quot;http://perfectpints.com/..&quot; >Shop </a></li> <li><a href= &quot;http://perfectpints.com/..&quot; >Profile </a></li> </ul> </div> </div> <?php } remove_action( 'thematic_header' , thematic_access ); add_action( 'thematic_header' , my_page_access ); functions.php
  24. 25. Modular CSS. <ul><li>Commonly re-used CSS separated. </li></ul>/* Theme Name: mychild Template: thematic */ /* 1. Reset browser defaults */ @import url ( '../thematic/library/styles/reset.css' ); /* 2. Apply basic typography styles */ @import url ( '../thematic/library/layouts/2c-r-fixed.css' ); /* 3. Apply a basic layout */ @import url ( '../thematic/library/styles/18px.css' ); /* 4. Apply default theme styles and colors */ @import url ( '../thematic/library/styles/default.css' );
  25. 29. Great Widget Support.       
  26. 30. Community Developed. Anyone know how to add a span to the inside of every heading tag? If you wait till tomorrow, I should have an easy solution. Need to do some tests first.
  27. 31. Community Developed.
  28. 32. Community Developed. Super stuff, works a treat! Here you go. Check out the latest version from the source and add this to your code …
  29. 33. A Future Default WP Theme?
  30. 34. A Future Default WP Theme?

×