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

一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
apekaom
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
F
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
hfkmxufye
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
AS
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
SS
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理
A
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
c6eb683559b3
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
mikehavy0
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
AS
 

Recently uploaded (20)

Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
 
Sholinganallur (Chennai) Independent Escorts - 9632533318 100% genuine
Sholinganallur (Chennai) Independent Escorts - 9632533318 100% genuineSholinganallur (Chennai) Independent Escorts - 9632533318 100% genuine
Sholinganallur (Chennai) Independent Escorts - 9632533318 100% genuine
 
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
APNIC Updates presented by Paul Wilson at CaribNOG 27
APNIC Updates presented by Paul Wilson at  CaribNOG 27APNIC Updates presented by Paul Wilson at  CaribNOG 27
APNIC Updates presented by Paul Wilson at CaribNOG 27
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理
 
Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
 
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
 

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/