SlideShare a Scribd company logo
1 of 16
Turbo charged
theme development

         Jonny Allbut
   Head of digital - Tanc Design
      Twitter: @Jonnyauk
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
CSS core classes to target


ā€¢ body classes
ā€¢ .hentry
ā€¢ .menu active page
ā€¢ widget classes
Code structure concepts


ā€¢ The 3 schools of code:
ā€¢ Conditional
ā€¢ Includes/get_template_part($slug,$name)
ā€¢ functions.php
Parent/child theme structure


ā€¢ Override just what you need
ā€¢ Re-use everything else!
ā€¢ Donā€™t re-invent the wheel
ā€¢ The single(ish!) ļ¬le theme
Parent/child theme structure

            CHILD THEME               PARENT THEME

style.css                 style.css
footer.php                header.php
                          page.php
                          footer.php
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
*/
Do the right thing


ā€¢ Use functions.php
ā€¢ Function exists
ā€¢ Your own hooks
ā€¢ Build for future expansion
  (child themes, portability of code)
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!
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)
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');
Widgetise the planet!


ā€¢ Not just for sidebars!
ā€¢ If populated?
ā€¢ Location conditional switch
ā€¢ Get URL switch
ā€¢ Custom ļ¬eld switch
WordPress menus


ā€¢ Use menus anywhere!
ā€¢ Last link class
ā€¢ Custom walker class
ā€¢ Cache it?
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
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
Turbo charged
theme development

         Jonny Allbut
   Head of digital - Tanc Design
      Twitter: @Jonnyauk

More Related Content

What's hot

Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012Joe Querin
Ā 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme developmentThad Allender
Ā 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Pluginssuperann
Ā 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012Stephanie Leary
Ā 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with ElementorAngela Bowman
Ā 
Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaTim Plummer
Ā 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong Laokok
Ā 
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom FieldsWordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom FieldsJoe Querin
Ā 
Beyond WP-CONTENT | #WCRaleigh
Beyond WP-CONTENT | #WCRaleighBeyond WP-CONTENT | #WCRaleigh
Beyond WP-CONTENT | #WCRaleighGlenn Ansley
Ā 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme developmentTammy Hart
Ā 
WP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesWP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesJoe Querin
Ā 
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 NepalChandra Prakash Thapa
Ā 
WP101 - Themes and Plugins
WP101 - Themes and PluginsWP101 - Themes and Plugins
WP101 - Themes and PluginsJoe Querin
Ā 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWPJoburg
Ā 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityMichelle Davies (Hryvnak)
Ā 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme DevelopmentBijay Oli
Ā 
Joomla tempates talk
Joomla tempates talkJoomla tempates talk
Joomla tempates talkChad Windnagle
Ā 
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Chris Charlton
Ā 
WP 101 - WordPress Basics
WP 101 - WordPress BasicsWP 101 - WordPress Basics
WP 101 - WordPress BasicsJoe Querin
Ā 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5Dylan Jay
Ā 

What's hot (20)

Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
Ā 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme development
Ā 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Plugins
Ā 
The WordPress University 2012
The WordPress University 2012The WordPress University 2012
The WordPress University 2012
Ā 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with Elementor
Ā 
Extension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with JoomlaExtension developer secrets - How to make money with Joomla
Extension developer secrets - How to make money with Joomla
Ā 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
Ā 
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom FieldsWordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
Ā 
Beyond WP-CONTENT | #WCRaleigh
Beyond WP-CONTENT | #WCRaleighBeyond WP-CONTENT | #WCRaleigh
Beyond WP-CONTENT | #WCRaleigh
Ā 
Custom WordPress theme development
Custom WordPress theme developmentCustom WordPress theme development
Custom WordPress theme development
Ā 
WP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post TypesWP 101 - Custom Fields & Post Types
WP 101 - Custom Fields & Post Types
Ā 
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
Ā 
WP101 - Themes and Plugins
WP101 - Themes and PluginsWP101 - Themes and Plugins
WP101 - Themes and Plugins
Ā 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
Ā 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
Ā 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
Ā 
Joomla tempates talk
Joomla tempates talkJoomla tempates talk
Joomla tempates talk
Ā 
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Ā 
WP 101 - WordPress Basics
WP 101 - WordPress BasicsWP 101 - WordPress Basics
WP 101 - WordPress Basics
Ā 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
Ā 

Similar to Turbo charged WordPress theme development - WordCamp Edinburgh 2012

WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013Curtiss Grymala
Ā 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Curtiss Grymala
Ā 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
Ā 
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2Mizanur Rahaman Mizan
Ā 
WordPress Themes 101 - HighEdWeb New England 2013
WordPress Themes 101 - HighEdWeb New England 2013WordPress Themes 101 - HighEdWeb New England 2013
WordPress Themes 101 - HighEdWeb New England 2013Curtiss Grymala
Ā 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016David Brattoli
Ā 
WordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopWordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopCurtiss Grymala
Ā 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
Ā 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...LinnAlexandra
Ā 
Child Themes and CSS in WordPress
Child Themes and CSS in WordPressChild Themes and CSS in WordPress
Child Themes and CSS in WordPressMatthew Vaccaro
Ā 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme developmentJonny Allbut
Ā 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sinsGeorge Stephanis
Ā 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
Ā 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
Ā 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme SurgeryRational Frank
Ā 
What are child themes, and why use them
What are child themes, and why use themWhat are child themes, and why use them
What are child themes, and why use themUtsav Singh Rathour
Ā 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Joe Querin
Ā 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Kelly Dwan
Ā 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesAndrew Wikel
Ā 

Similar to Turbo charged WordPress theme development - WordCamp Edinburgh 2012 (20)

WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013
Ā 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Ā 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
Ā 
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
Ā 
WordPress Themes 101 - HighEdWeb New England 2013
WordPress Themes 101 - HighEdWeb New England 2013WordPress Themes 101 - HighEdWeb New England 2013
WordPress Themes 101 - HighEdWeb New England 2013
Ā 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
Ā 
WordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopWordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 Workshop
Ā 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Ā 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Ā 
Child Themes and CSS in WordPress
Child Themes and CSS in WordPressChild Themes and CSS in WordPress
Child Themes and CSS in WordPress
Ā 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
Ā 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
Ā 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
Ā 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
Ā 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
Ā 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme Surgery
Ā 
What are child themes, and why use them
What are child themes, and why use themWhat are child themes, and why use them
What are child themes, and why use them
Ā 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Ā 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)
Ā 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child Themes
Ā 

More from Jonny Allbut

WordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingWordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingJonny Allbut
Ā 
Your Online Marketing ā€Ø& Social Media Toolkit - Wider
Your Online Marketing ā€Ø& Social Media Toolkit - WiderYour Online Marketing ā€Ø& Social Media Toolkit - Wider
Your Online Marketing ā€Ø& Social Media Toolkit - WiderJonny Allbut
Ā 
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus SmarterWordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus SmarterJonny Allbut
Ā 
How to use WordPress
How to use WordPressHow to use WordPress
How to use WordPressJonny Allbut
Ā 
How to create and develop a winning brand
How to create and develop a winning brandHow to create and develop a winning brand
How to create and develop a winning brandJonny Allbut
Ā 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopJonny Allbut
Ā 
WordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeWordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeJonny Allbut
Ā 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressJonny Allbut
Ā 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationJonny Allbut
Ā 
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Jonny Allbut
Ā 
Freelance presentation v2
Freelance presentation v2Freelance presentation v2
Freelance presentation v2Jonny Allbut
Ā 
Wordcamp 2010 presentation
Wordcamp 2010 presentationWordcamp 2010 presentation
Wordcamp 2010 presentationJonny Allbut
Ā 
WordCamp UK 2009 presentation
WordCamp UK 2009 presentationWordCamp UK 2009 presentation
WordCamp UK 2009 presentationJonny Allbut
Ā 
WordPress Is Not A Blog from WordCamp UK 2008
WordPress Is Not A Blog from WordCamp UK 2008WordPress Is Not A Blog from WordCamp UK 2008
WordPress Is Not A Blog from WordCamp UK 2008Jonny Allbut
Ā 

More from Jonny Allbut (14)

WordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingWordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme building
Ā 
Your Online Marketing ā€Ø& Social Media Toolkit - Wider
Your Online Marketing ā€Ø& Social Media Toolkit - WiderYour Online Marketing ā€Ø& Social Media Toolkit - Wider
Your Online Marketing ā€Ø& Social Media Toolkit - Wider
Ā 
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus SmarterWordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus Smarter
Ā 
How to use WordPress
How to use WordPressHow to use WordPress
How to use WordPress
Ā 
How to create and develop a winning brand
How to create and develop a winning brandHow to create and develop a winning brand
How to create and develop a winning brand
Ā 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshop
Ā 
WordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeWordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the trade
Ā 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
Ā 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow Presentation
Ā 
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Ā 
Freelance presentation v2
Freelance presentation v2Freelance presentation v2
Freelance presentation v2
Ā 
Wordcamp 2010 presentation
Wordcamp 2010 presentationWordcamp 2010 presentation
Wordcamp 2010 presentation
Ā 
WordCamp UK 2009 presentation
WordCamp UK 2009 presentationWordCamp UK 2009 presentation
WordCamp UK 2009 presentation
Ā 
WordPress Is Not A Blog from WordCamp UK 2008
WordPress Is Not A Blog from WordCamp UK 2008WordPress Is Not A Blog from WordCamp UK 2008
WordPress Is Not A Blog from WordCamp UK 2008
Ā 

Recently uploaded

VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130 Available With Roomdivyansh0kumar0
Ā 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
Ā 
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248  Good Looking standard Profil...Verified Trusted Call Girls AdugodišŸ’˜ 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248 Good Looking standard Profil...kumaririma588
Ā 
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļø
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļøCall Girls in Kalkaji Delhi 8264348440 call girls ā¤ļø
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļøsoniya singh
Ā 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfAmirYakdi
Ā 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...Suhani Kapoor
Ā 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation decktbatkhuu1
Ā 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsCharles Obaleagbon
Ā 
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...nagunakhan
Ā 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
Ā 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
Ā 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxTusharBahuguna2
Ā 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...ranjana rawat
Ā 
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...nagunakhan
Ā 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
Ā 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptxVanshNarang19
Ā 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...babafaisel
Ā 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Delhi Call girls
Ā 

Recently uploaded (20)

VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat šŸ‘‰ 8250192130 Available With Room
Ā 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Ā 
escort service sasti (*~Call Girls in Prasad Nagar Metroā¤ļø9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metroā¤ļø9953056974escort service sasti (*~Call Girls in Prasad Nagar Metroā¤ļø9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metroā¤ļø9953056974
Ā 
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248  Good Looking standard Profil...Verified Trusted Call Girls AdugodišŸ’˜ 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls AdugodišŸ’˜ 9352852248 Good Looking standard Profil...
Ā 
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļø
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļøCall Girls in Kalkaji Delhi 8264348440 call girls ā¤ļø
Call Girls in Kalkaji Delhi 8264348440 call girls ā¤ļø
Ā 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
Ā 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
Ā 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
Ā 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past Questions
Ā 
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...
Punjabi Housewife Call Girls Service Gomti Nagar \ 9548273370 Indian Call Gir...
Ā 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
Ā 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Ā 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
Ā 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
Ā 
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...
Nepali Escort Girl Gomti Nagar \ 9548273370 Indian Call Girls Service Lucknow...
Ā 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Ā 
young call girls in Vivek ViharšŸ” 9953056974 šŸ” Delhi escort Service
young call girls in Vivek ViharšŸ” 9953056974 šŸ” Delhi escort Serviceyoung call girls in Vivek ViharšŸ” 9953056974 šŸ” Delhi escort Service
young call girls in Vivek ViharšŸ” 9953056974 šŸ” Delhi escort Service
Ā 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptx
Ā 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Ā 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Ā 

Turbo charged WordPress theme development - WordCamp Edinburgh 2012

  • 1. Turbo charged theme development Jonny Allbut Head of digital - Tanc Design Twitter: @Jonnyauk
  • 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
  • 6. Parent/child theme structure CHILD THEME PARENT THEME style.css style.css footer.php header.php page.php footer.php
  • 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
  • 16. Turbo charged theme development Jonny Allbut Head of digital - Tanc Design Twitter: @Jonnyauk