SlideShare a Scribd company logo
1 of 41
Download to read offline
Theming in WordPress
Where Do I Start?
Edmund Turbin, Solutions Engineer @spicecadet
1. Introduction
2. Theme Anatomy
3. Starter Themes
4. Child Themes
5. Theme Frameworks
6. Summary
Agenda
THEME ANATOMY
Anatomy of a Theme
Stylesheet
• controls visual design/layout
• comments for theme meta info
Anatomy of a Theme
Templates
•Control how content is displayed
•HTML and PHP
Anatomy of a Theme
Functions
•Optional - customize what the theme does
•Need to understand WP coding standards
Anatomy of a Theme
Theme Information
/*
Theme Name: Where do I start?
Theme URI: Your theme's URL
Author: Your name or WordPress.org's username
Author URI: Your web address
Description: This is the minimum for creating a custom theme.
Version: 1.0
Tags: one-column, custom-colors, custom-header, blog, education
*/
Theme Information
Templates
• Control display logic
• Generate the structure of your HTML
• Can be created for pages, posts, CPTs, etc.
• Can include partials
https://developer.wordpress.org/themes/basics/template-hierarchy/
https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/
functions.php
• Acts as a plugin
• Load scripts and styles
• Enable theme features
• sidebars, nav menus, post formats, etc
• Define functions used across several templates
• Customize your theme’s behavior
https://codex.wordpress.org/Functions_File_Explained
WORKING WITH
STARTER THEMES
What is a Starter Theme?
• A foundation to start
customizing
• Leverage existing code
• Incorporates best practices
• Created to be re-used and
customized
When Should I Use a Starter Theme?
• Your first theme
• Functionality, layouts,
patterns exist already
Starter Theme Best Practices
• Don’t update your theme
• New functionality or
changes my break it
https://themeshaper.com/2013/10/11/dont-update-your-theme/
CREATING A SITE WITH
CHILD THEMES
When to Use a Child Theme
• A theme exists and can be extended
• Speed up development time
Child Tmp
CSS
Func
Parent Tmp
CSS
Func
Benefits of a Child Theme
• Inherits parent functionality
• Extend styles, functions and templates
• Can be updated
• Don’t have to modify parent code
Child Tmp
CSS
Func
Parent Tmp
CSS
Func
How to Create a Child Theme
• Create a new directory in wp-themes
• Create a style.css file
• Change the Template: directory
• Add templates, functions, styles
Child Tmp
CSS
Func
Parent Tmp
CSS
Func
How to Create a Child Theme
/*
 
Theme Name: Where Do I Start Child Theme
 
Description: Description of your Child Theme
 
Author: Your name here
 
Template: folder
 
*/
Add Stylesheet
add_action( ‘wp_enqueue_scripts', 'enqueue_styles' );
function enqueue_styles() {
wp_enqueue_style( ‘theme-css',
get_template_directory_uri() . '/style.css' );
}
Things to Know about Child Templates
• Parent templates inherited
• Child templates override parent
templates
• Can be specific to a page
• page-{slug}.php
Child Tmp
CSS
Func
Parent Tmp
CSS
Func
Things to Know about Child Functions
• Parent functions will run automatically
• Child functions load before parent
functions
• Parent functions can be overridden Child Tmp
CSS
Func
Parent Tmp
CSS
Func
OVERRIDING PARENT
FUNCTIONS
Pluggable Functions
if ( ! function_exists( ‘my_function' ) ):
function my_function() {
// Your code goes here
}
endif;
Function Priority
• Function priority defaults to ’10’
• Child functions run after parent
functions via priority
Example: Overriding Functions with Function Priority
add_action( 'init', ‘my_function’ , 15 );
function my_function() {
// Your code goes here.
}
Removing Functions
• Completely removes the function
• remove_action()
• Called after the initial function
http://code.tutsplus.com/tutorials/a-guide-to-overriding-parent-theme-functions-in-your-child-theme--cms-22623
function()
Example: Removing Functions with remove_action()
add_action( 'wp_loaded', 'remove_parent' );
function remove_parent() {
remove_action( 'init', 'parent_function' );
}
Can it be Easier?
• There’s a plugin for that!
https://wordpress.org/plugins/one-click-child-theme/
UNDERSTANDING
THEME FRAMEWORKS
What is a Theme Framework?
• Code library with tools for commonly used tasks
• Parent theme allows for updates
• Support different development approaches
• Many existing themes already built
Theme Framework Benefits
• Maintain features and optimizations across themes
• Many built by commercial theme developers
• Commonly used
• Support and updates
• Development ongoing
Theme Framework Examples
http://athemes.com/collections/best-wordpress-theme-frameworks/
SUMMARY
Solid Foundation
Starter Themes, Child Themes
and Theme Frameworks
Theme Frameworks
Well known, supported
and reusable
You can always build your own theme
from scratch.
No harm in using an existing theme and
customizing.
Let’s chat @ the
Happiness Bar :)
Halle G Foyer
@spicecadet
edmund.turbin@wpengine.com
Thank you!
@spicecadet
edmund.turbin@wpengine.com
Learn More
The Theme Handbook
https://developer.wordpress.org/themes/
Starter Themes
http://www.designbombs.com/8-best-wordpress-starter-
themes-frameworks-new-wp-developers/
Theme Frameworks
http://athemes.com/collections/best-wordpress-theme-
frameworks/

More Related Content

What's hot

WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
Joe Casabona
 
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
Joe Querin
 

What's hot (20)

NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
WordPress Customization and Security
WordPress Customization and SecurityWordPress Customization and Security
WordPress Customization and Security
 
Using composer with WordPress
Using composer with WordPressUsing composer with WordPress
Using composer with WordPress
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLI
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Child Theme
Child ThemeChild Theme
Child Theme
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
CSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the GutsCSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the Guts
 
You Got React.js in My PHP
You Got React.js in My PHPYou Got React.js in My PHP
You Got React.js in My PHP
 
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
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpack
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 

Viewers also liked

Architecture Behind WordPress.com
Architecture Behind WordPress.comArchitecture Behind WordPress.com
Architecture Behind WordPress.com
photomatt
 

Viewers also liked (20)

State of the Word 2013
State of the Word 2013State of the Word 2013
State of the Word 2013
 
How WordPress Changed My Life! - Ricky Blacker
How WordPress Changed My Life! - Ricky BlackerHow WordPress Changed My Life! - Ricky Blacker
How WordPress Changed My Life! - Ricky Blacker
 
The Child Theme Dilemma (EN) - Milano Edition
The Child Theme Dilemma (EN) - Milano EditionThe Child Theme Dilemma (EN) - Milano Edition
The Child Theme Dilemma (EN) - Milano Edition
 
Website Redesign A-Z
Website Redesign A-ZWebsite Redesign A-Z
Website Redesign A-Z
 
A Freelancer's Guide To Handling Difficult Clients
A Freelancer's Guide To Handling Difficult ClientsA Freelancer's Guide To Handling Difficult Clients
A Freelancer's Guide To Handling Difficult Clients
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014Hardcore URL Routing for WordPress - WordCamp Atlanta 2014
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014
 
How To See Through Your Business’s Blind Spots
How To See Through Your Business’s Blind Spots   How To See Through Your Business’s Blind Spots
How To See Through Your Business’s Blind Spots
 
My Website Is Old Enough To Vote - Kris Howard
My Website Is Old Enough To Vote - Kris HowardMy Website Is Old Enough To Vote - Kris Howard
My Website Is Old Enough To Vote - Kris Howard
 
Edupreneurship With WordPress - Sam Bizri
Edupreneurship With WordPress - Sam BizriEdupreneurship With WordPress - Sam Bizri
Edupreneurship With WordPress - Sam Bizri
 
Customize Your WordPress Theme the Right Way
Customize Your WordPress Theme the Right WayCustomize Your WordPress Theme the Right Way
Customize Your WordPress Theme the Right Way
 
Evolving the Kanban Board
Evolving the Kanban BoardEvolving the Kanban Board
Evolving the Kanban Board
 
Lecture - (WordPress) Usability Issues
Lecture - (WordPress) Usability IssuesLecture - (WordPress) Usability Issues
Lecture - (WordPress) Usability Issues
 
Architecture Behind WordPress.com
Architecture Behind WordPress.comArchitecture Behind WordPress.com
Architecture Behind WordPress.com
 
WordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and VagrantWordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and Vagrant
 
Honey - You're Not Even Responsive - Sharon France
Honey - You're Not Even Responsive - Sharon FranceHoney - You're Not Even Responsive - Sharon France
Honey - You're Not Even Responsive - Sharon France
 
WordPress 4.4 and Beyond
WordPress 4.4 and BeyondWordPress 4.4 and Beyond
WordPress 4.4 and Beyond
 
What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?
 
WordPress: Getting Under the Hood
WordPress: Getting Under the HoodWordPress: Getting Under the Hood
WordPress: Getting Under the Hood
 
Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 

Similar to Theming in WordPress - Where do I Start?

Word press templates
Word press templatesWord press templates
Word press templates
Dan Phiffer
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
openchamp
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
lightshire
 

Similar to Theming in WordPress - Where do I Start? (20)

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
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
Turbo charged WordPress theme development - WordCamp Edinburgh 2012
Turbo charged WordPress theme development - WordCamp Edinburgh 2012Turbo charged WordPress theme development - WordCamp Edinburgh 2012
Turbo charged WordPress theme development - WordCamp Edinburgh 2012
 
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
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Word press templates
Word press templatesWord press templates
Word press templates
 
MCC Web Design Workshop
MCC Web Design WorkshopMCC Web Design Workshop
MCC Web Design Workshop
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press development
 
WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013WordPress Themes 101 - dotEduGuru Summit 2013
WordPress Themes 101 - dotEduGuru Summit 2013
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014Content-Driven WordPress Development - WordCamp Omaha 2014
Content-Driven WordPress Development - WordCamp Omaha 2014
 
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
 
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
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
 
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 ...
 

More from Edmund Turbin

More from Edmund Turbin (14)

Remote Control WordPress
Remote Control WordPressRemote Control WordPress
Remote Control WordPress
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDN
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word press
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
Customize it.
Customize it.Customize it.
Customize it.
 
Word press gets responsive 4x3
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3
 
Scaling WooCommerce on WP Engine
Scaling WooCommerce on WP EngineScaling WooCommerce on WP Engine
Scaling WooCommerce on WP Engine
 
Working in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflowsWorking in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflows
 
Working in harmony
Working in harmonyWorking in harmony
Working in harmony
 
Woo commerce scalability notes
Woo commerce scalability   notesWoo commerce scalability   notes
Woo commerce scalability notes
 
Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.
 

Recently uploaded

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 

Recently uploaded (20)

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 

Theming in WordPress - Where do I Start?

  • 1. Theming in WordPress Where Do I Start? Edmund Turbin, Solutions Engineer @spicecadet
  • 2. 1. Introduction 2. Theme Anatomy 3. Starter Themes 4. Child Themes 5. Theme Frameworks 6. Summary Agenda
  • 4. Anatomy of a Theme Stylesheet • controls visual design/layout • comments for theme meta info
  • 5. Anatomy of a Theme Templates •Control how content is displayed •HTML and PHP
  • 6. Anatomy of a Theme Functions •Optional - customize what the theme does •Need to understand WP coding standards
  • 7. Anatomy of a Theme
  • 8. Theme Information /* Theme Name: Where do I start? Theme URI: Your theme's URL Author: Your name or WordPress.org's username Author URI: Your web address Description: This is the minimum for creating a custom theme. Version: 1.0 Tags: one-column, custom-colors, custom-header, blog, education */
  • 10. Templates • Control display logic • Generate the structure of your HTML • Can be created for pages, posts, CPTs, etc. • Can include partials https://developer.wordpress.org/themes/basics/template-hierarchy/ https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/
  • 11. functions.php • Acts as a plugin • Load scripts and styles • Enable theme features • sidebars, nav menus, post formats, etc • Define functions used across several templates • Customize your theme’s behavior https://codex.wordpress.org/Functions_File_Explained
  • 13. What is a Starter Theme? • A foundation to start customizing • Leverage existing code • Incorporates best practices • Created to be re-used and customized
  • 14. When Should I Use a Starter Theme? • Your first theme • Functionality, layouts, patterns exist already
  • 15. Starter Theme Best Practices • Don’t update your theme • New functionality or changes my break it https://themeshaper.com/2013/10/11/dont-update-your-theme/
  • 16. CREATING A SITE WITH CHILD THEMES
  • 17. When to Use a Child Theme • A theme exists and can be extended • Speed up development time Child Tmp CSS Func Parent Tmp CSS Func
  • 18. Benefits of a Child Theme • Inherits parent functionality • Extend styles, functions and templates • Can be updated • Don’t have to modify parent code Child Tmp CSS Func Parent Tmp CSS Func
  • 19. How to Create a Child Theme • Create a new directory in wp-themes • Create a style.css file • Change the Template: directory • Add templates, functions, styles Child Tmp CSS Func Parent Tmp CSS Func
  • 20. How to Create a Child Theme /*   Theme Name: Where Do I Start Child Theme   Description: Description of your Child Theme   Author: Your name here   Template: folder   */
  • 21. Add Stylesheet add_action( ‘wp_enqueue_scripts', 'enqueue_styles' ); function enqueue_styles() { wp_enqueue_style( ‘theme-css', get_template_directory_uri() . '/style.css' ); }
  • 22. Things to Know about Child Templates • Parent templates inherited • Child templates override parent templates • Can be specific to a page • page-{slug}.php Child Tmp CSS Func Parent Tmp CSS Func
  • 23. Things to Know about Child Functions • Parent functions will run automatically • Child functions load before parent functions • Parent functions can be overridden Child Tmp CSS Func Parent Tmp CSS Func
  • 25. Pluggable Functions if ( ! function_exists( ‘my_function' ) ): function my_function() { // Your code goes here } endif;
  • 26. Function Priority • Function priority defaults to ’10’ • Child functions run after parent functions via priority
  • 27. Example: Overriding Functions with Function Priority add_action( 'init', ‘my_function’ , 15 ); function my_function() { // Your code goes here. }
  • 28. Removing Functions • Completely removes the function • remove_action() • Called after the initial function http://code.tutsplus.com/tutorials/a-guide-to-overriding-parent-theme-functions-in-your-child-theme--cms-22623 function()
  • 29. Example: Removing Functions with remove_action() add_action( 'wp_loaded', 'remove_parent' ); function remove_parent() { remove_action( 'init', 'parent_function' ); }
  • 30. Can it be Easier? • There’s a plugin for that! https://wordpress.org/plugins/one-click-child-theme/
  • 32. What is a Theme Framework? • Code library with tools for commonly used tasks • Parent theme allows for updates • Support different development approaches • Many existing themes already built
  • 33. Theme Framework Benefits • Maintain features and optimizations across themes • Many built by commercial theme developers • Commonly used • Support and updates • Development ongoing
  • 36. Solid Foundation Starter Themes, Child Themes and Theme Frameworks
  • 37. Theme Frameworks Well known, supported and reusable
  • 38. You can always build your own theme from scratch. No harm in using an existing theme and customizing.
  • 39. Let’s chat @ the Happiness Bar :) Halle G Foyer @spicecadet edmund.turbin@wpengine.com
  • 41. Learn More The Theme Handbook https://developer.wordpress.org/themes/ Starter Themes http://www.designbombs.com/8-best-wordpress-starter- themes-frameworks-new-wp-developers/ Theme Frameworks http://athemes.com/collections/best-wordpress-theme- frameworks/