2. CSS structure concepts
ā¢ Commonality and future ļ¬exibility
ā¢ Create whole layout logic before classes
ā¢ Plan ahead - Use common - then additional speciļ¬c
ā¢ Classes not ID's where possible
ā¢ Common core styles to target
3. CSS core classes to target
ā¢ body classes
ā¢ .hentry
ā¢ .menu active page
ā¢ widget classes
4. Code structure concepts
ā¢ The 3 schools of code:
ā¢ Conditional
ā¢ Includes/get_template_part($slug,$name)
ā¢ functions.php
5. Parent/child theme structure
ā¢ Override just what you need
ā¢ Re-use everything else!
ā¢ Donāt re-invent the wheel
ā¢ The single(ish!) ļ¬le theme
7. Parent/child how to do it
/*
Theme Name: My Super Child Theme
Theme URI: http://jonnya.net/
Description: My child theme
Author: Jonny Allbut/Tanc Design
Author URI: http://tancdesign.com
Template: twentyeleven
Version: 0.1
*/
8. Do the right thing
ā¢ Use functions.php
ā¢ Function exists
ā¢ Your own hooks
ā¢ Build for future expansion
(child themes, portability of code)
9. Use the core
ā¢ DONāT just copy and paste - understand
ā¢ Use core WordPress functions in your code
ā¢ Look at the core - ļ¬lters
ā¢ More ļ¬exibility than you may think!
10. Use the core - examples
ā¢ human_time_diff($from, $to)
ā¢ wpautop($content)
ā¢ wp_trim_words($text, $num_words, $more)
ā¢ body and post div class ļ¬lters
ā¢ get_
ā¢ __return
ā¢ _true / _false / _zero / _empty_array / _null (3.4 only)
11. Use the core - examples
add_ļ¬lter('login_errors', 'my_login_function');
function my_login_function(){
return null;
}
add_ļ¬lter('login_errors', create_function('$a', "return null;"));
add_ļ¬lter('login_errors','__return_null');
12. Widgetise the planet!
ā¢ Not just for sidebars!
ā¢ If populated?
ā¢ Location conditional switch
ā¢ Get URL switch
ā¢ Custom ļ¬eld switch
13. WordPress menus
ā¢ Use menus anywhere!
ā¢ Last link class
ā¢ Custom walker class
ā¢ Cache it?
14. Theme customizer
ā¢ New to WP3.4 - this changes EVERYTHING!
ā¢ http://ottopress.com/2012/how-to-leverage-the-theme-
customizer-in-your-own-themes/
ā¢ http://wordpress.org/extend/plugins/css/
ā¢ Demonstration
15. Stop hacking - make themes NOW!
ā¢ Design to purpose
ā¢ Plan ahead and re-use
ā¢ Think of the future
ā¢ Get smart with CSS
ā¢ Widgets and menus
ā¢ Use the core