SlideShare a Scribd company logo
“..a collection of files that work together to
produce a graphical interface with an underlying
unifying design for a weblog. These files are called
template files.
A Theme modifies the way the site is displayed,
without modifying the underlying software.”
Ref: https://codex.wordpress.org/Using_Themes
Provides front end styling for page areas &
content
• header, footer and logo areas
• fonts & colors
• widget and sidebar locations
• page layouts (or templates)
• styles for blog posts and blog archives
• additional stylistic details and custom post types
1,000’s of free themes at wordpress.org/themes
all human vetted and all safe (no malware).
Paid themes:
• Themeforest
• Elegant Themes
• StudioPress
There are many more paid sites – we vouch for these 3
You can have a unique theme built for your site.
We know a theme is a collection of files.
Which files do what?
How do they work together to “theme” your site?
In a default installation all themes reside in the
folder: /wp-content/themes/<unique_theme_name>
However, this folder path can be changed at a
site level. Use functions in theme code to find
the correct folder.
get_template_directory_uri() get_template_directory()
get_stylesheet_directory_uri() get_stylesheet_directory()
get_theme_root_uri() get_theme_root()
get_stylesheet_uri()
get_theme_roots()
Ref: https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Themes
Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/
Main types of theme template files are:
• .php = PHP language files used to build
template structure and output content
(required)
• .css = Style sheet files used to apply style to
template structure and content (required)
• .js = JavaScript files used for real-time user
interface (UI) interaction & manipulation and
much more (optional)
Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/
A web server converts/renders PHP files to a
static HTML page which is sent to the browser
along with any corresponding CSS and other
asset files such as images.
Static HTML pages rendered from PHP files
cannot interact with the user in the browser no
matter how much they wiggle, move or click
their mouse pointer at things on the page.
Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/
JavaScript runs in the browser and detects
“events” such as window resize, mouse
overs/movement/clicks, field
selections/changes/input etc.
JavaScript functions are bound to browser
events allowing the HTML and CSS of the static
page to now be changed dynamically in
response to that event.
Most important template file.
Your theme must have an index.php
This is the main blog article archive/page and top
of the hierarchy (last to render)
If there are no other php template files, index.php
will be used to render the current web page.
Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/
2nd most important theme file.
Your theme must have a style.css
This file contains the theme name, version,
description and license type that is displayed on
the Appearance > Themes dashboard panel.
Other primary templates are:
• archive.php
The archive template is used when visitors request posts by
category, author, or date.
• single.php
The single post template is used when a visitor requests a single
post.
• page.php
The page template is used when visitors request individual
pages, which are a built-in template.
Other primary templates are:
• singular.php
The singular template is used for posts when single.php is not
found, or for pages when page.php are not found.
• home.php
The home page template is the front page by default. If you do
not set WordPress to use a static front page, this template is
used to show latest posts.
• front-page.php
The front page template is always used as the site front page if it
exists, regardless of what settings on Admin > Settings > Reading.
Other primary templates are:
• comments.php
The comments template.
• 404.php
The 404 template is used when WordPress cannot find a post,
page, or other content that matches the visitor’s request.
• search.php
The search results template is used to display a visitor’s search
results.
Needs to be in the root directory of your theme.
/wp-content/themes/<unique_theme_name>/style.css
WordPress uses the header comment section of a
style.css to display information about the theme
in the Appearance > Themes dashboard panel.
These header comments in style.css are required.
There are more you can use.
/*
Theme Name: Twenty Sixteen
Author: the WordPress Team
Description: Twenty Sixteen is a modernised take on an ever-
popular WordPress layout
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentysixteen
*/
Ref: https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/
There is no official required
theme folder structure.
Here’s an example based on
Twenty Sixteen.
Primary template files are
located in the root of your
theme folder.
Assets are in a separate sub
folder.
assets (dir)
- css (dir)
- images (dir)
- js (dir)
template-parts (dir)
- footer (dir)
- header (dir)
- navigation (dir)
- page (dir)
- post (dir)
404.php
archive.php
footer.php
front-page.php
functions.php
header.php
index.php
page.php
README.txt
rtl.css
screenshot.png
single.php
style.css
Template tags are used within themes to retrieve
content from your database.
They help you to avoid hard coding content into
template files.
A template tag is broken up into three parts:
• A PHP code tag
• A WordPress function
• Optional parameters
Ref: https://developer.wordpress.org/themes/basics/template-tags/
Printing the header.php file using get_header():
<?php get_header(); ?>
Printing the blog site title (Settings > General):
<?php bloginfo(‘name’); ?>
Other template tags:
the_content() the_excerpt()
next_post() previous_post()
The Loop is the default mechanism WordPress
uses for outputting posts through a theme’s
template files.
The Loop extracts the data for each post from the
WordPress database and inserts the appropriate
information in place of each template tag. Any
HTML or PHP code in The Loop will be processed
for each post.
Ref: https://developer.wordpress.org/themes/basics/the-loop/
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
the_content();
endwhile;
else :
_e( 'Sorry, no posts matched your criteria.',
'textdomain' );
endif;
The functions.php file is where you add unique
features to your WordPress theme.
It can be used to hook into the core functions of
WordPress to make your theme more modular,
extensible, and functional.
Each theme has its own functions file, but only
code in the active theme’s functions.php is
actually run. If your theme already has a functions
file, you can add code to it.
Ref: https://developer.wordpress.org/themes/basics/theme-functions/
if ( ! function_exists( 'myfirsttheme_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*/
function myfirsttheme_setup() {
/**
* Make theme available for translation.
* Translations can be placed in the /languages/ directory.
*/
load_theme_textdomain( 'myfirsttheme', get_template_directory() . '/languages' );
}
endif; // myfirsttheme_setup
add_action( 'after_setup_theme', 'myfirsttheme_setup' );
Ref: https://developer.wordpress.org/themes/basics/theme-functions/
You may want to create additional style sheet or
JavaScript files to enhance your theme.
The proper way to add scripts and styles to your
theme is to enqueue them in the functions.php
file.
You do not add them manually to the header.php
file as you would with an HTML page.
Ref: https://developer.wordpress.org/themes/basics/including-css-javascript
Function:
wp_enqueue_style( $handle, $src, $deps, $ver, $media );
Parameters:
• $handle is simply the name of the stylesheet.
• $src is where it is located. The rest of the parameters are optional.
• $deps refers to whether or not this stylesheet is dependent on another
stylesheet. If this is set, this stylesheet will not be loaded unless its dependent
stylesheet is loaded first.
• $ver sets the version number.
• $media specify type of media to load, such as ‘all’, ‘screen’, or ‘print’
Basic function use:
wp_enqueue_style( 'style', get_stylesheet_uri() );
Function:
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
Parameters:
• $handle is simply the name of the script.
• $src is where it is located. The rest of the parameters are optional.
• $deps is an array that can handle any script that your new script depends on,
such as jQuery.
• $ver sets the version number.
• $in_footer is a boolean parameter (true/false) that allows you to place your
scripts in the footer of your HTML document rather then in the header
Basic function use:
wp_enqueue_script( script', get_template_directory_uri() );
Styles and scripts are usually loaded on an action
hook. E.g.
/**
* Proper way to enqueue scripts and styles
*/
function wpdocs_theme_name_scripts() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() .
'/js/example.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );
Can be used in your template files to alter the
display of content depending on the conditions
that the current page matches.
Display a different greeting for logged in/out users.
if ( is_user_logged_in() ):
echo 'Welcome, registered user!';
else:
echo 'Welcome, visitor!';
endif;
Ref: https://developer.wordpress.org/themes/basics/conditional-tags/
Developing your theme, so it can easily be
translated into other languages.
To make a string translatable you have to wrap the
original strings in a set of special functions that
use your uniquely defined text domain.
The text domain is a unique identifier, which
makes sure WordPress can distinguish between all
loaded translations.
Ref: https://developer.wordpress.org/themes/functionality/internationalization/
Rather than use English only output:
echo 'Your city is $city.‘
Run it through the __() PHP gettext library for
translation using the my-theme text domain:
printf(
__( 'Your city is %s.', 'my-theme' ),
$city
);
A child theme allows you to change small aspects
of your site’s appearance yet still preserve your
theme’s look and functionality.
Parent Theme
A parent theme is a complete theme which
includes all of the required WordPress template
files and assets for the theme to work
Ref: https://developer.wordpress.org/themes/advanced-topics/child-themes/
Inherits the look and feel of the parent theme and
all of its functions, but can be used to make
modifications to any part of the theme.
In this way, customizations are kept separate from
the parent theme’s files.
Using a child theme lets you upgrade/override the
parent theme without affecting the customizations
you’ve made to your site.
Example:
You may have bought a premium theme and
created a child theme to tweak a few styles and
pages.
A major bug is found in the parent theme and
fixed by the author.
An update is available in the dashboard.
Example continued…
You update the parent successfully.
Your changes in the child theme are not deleted
and still override the newly updated parent
theme.
Had you changed the parent theme, your changes
would have been lost with the new update.
WordPress theme frameworks are intended to be
used as parent themes to aid the development of
a child theme.
They contain all the basic structures and
functionalities you would need to create a theme
but lack the styling and completeness you would
expect to find in a working theme for a website.
Ref: https://codex.wordpress.org/Theme_Frameworks
As a parent theme, the framework can be updated
to add new features and fix issues.
Customizations to the child theme, hence the
actual website, remain separate and unchanged,
inheriting the new features and receiving
framework issue fixes.
Developers like using frameworks for consistency
across sites and access to a larger community of
other skilled framework developers.
A popular commercial framework is Genesis.
Other frameworks include:
• Headway (drag & drop)
• Divi (drag & drop)
• Themify
• Beans
• Unyson
Consider theme security as you add functionality.
• Don’t trust any data. Validate all input from
users, 3rd party APIs and the database and
sanitize (escape) data before use or output.
• Use WordPress API functions first. Core
WordPress functions provide functionality of
validating and sanitizing data.
• Keep your theme up to date. Technology
evolves and bugs get found and fixed over time.
Ref: https://developer.wordpress.org/themes/theme-security/
A theme must meet certain requirements to be
included in the WordPress.org theme repository.
Adhering to these requirements is best practice for
theme development even if you don’t intend to
submit to the repository at WordPress.org
Accessibility, Code Quality, Use of Core Features,
Documentation, Language, Licensing, etc…
Ref: https://make.wordpress.org/themes/handbook/review/required/
Themes are reviewed by the Theme Review Team.
Before uploading, your theme must adhere to
• Theme Review Guidelines
• Testing With Sample Data
• Theme Check Plugin
Read the actual review process the team uses.
Ref: https://developer.wordpress.org/themes/release/submitting-your-theme-to-wordpress-org/
The most important thing about designing and
developing a theme is that you have fun doing it!
[Cover/Background] marktimemedia.com
[9] marktimemedia.com
[10] marktimemedia.com
[43] imgur.com
[Back Cover] zeropointdevelopment.com
 20+ years in IT: Dev & SysOps
 WordPress Developer since 2008
 Plugins, APIs, Security & Systems Integrations
 Organiser WPSyd & WordCamp Sydney
zeropointdevelopment.com
@DeveloperWil
♥ Pizza & Craft Beer
WordPress Theming 101

More Related Content

What's hot

Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
 
Word press templates
Word press templatesWord press templates
Word press templatesDan Phiffer
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
Matt Wiebe
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemAzharul Haque Shohan
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011
David Carr
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
Jamie Schmid
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
Web Development Montreal
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPP
Rupesh Kumar
 
Advanced Intro to Wordpress
Advanced Intro to WordpressAdvanced Intro to Wordpress
Advanced Intro to Wordpress
Clique Studios
 
20100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.120100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.1Gilles Guirand
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme Surgery
Rational Frank
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
Brad Williams
 

What's hot (18)

Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Word press templates
Word press templatesWord press templates
Word press templates
 
skintutorial
skintutorialskintutorial
skintutorial
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPP
 
Advanced Intro to Wordpress
Advanced Intro to WordpressAdvanced Intro to Wordpress
Advanced Intro to Wordpress
 
20100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.120100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.1
 
Crash Course in Theme Surgery
Crash Course in Theme SurgeryCrash Course in Theme Surgery
Crash Course in Theme Surgery
 
Css
CssCss
Css
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Apache
ApacheApache
Apache
 
Php intro
Php introPhp intro
Php intro
 

Viewers also liked

WordPress News - March 2017
WordPress News - March 2017WordPress News - March 2017
WordPress News - March 2017
WordPress Sydney
 
WordPress News - February 2017
WordPress News - February 2017WordPress News - February 2017
WordPress News - February 2017
WordPress Sydney
 
WordPress Security Best Practices
WordPress Security Best PracticesWordPress Security Best Practices
WordPress Security Best Practices
Zero Point Development
 
Five Minute SEO
Five Minute SEOFive Minute SEO
Scaling WordPress for High Traffic - Server Architecture
Scaling WordPress for High Traffic - Server ArchitectureScaling WordPress for High Traffic - Server Architecture
Scaling WordPress for High Traffic - Server Architecture
Zero Point Development
 
Monetising WordPress
Monetising WordPressMonetising WordPress
Monetising WordPress
Zero Point Development
 
Understanding Open Source & GPL
Understanding Open Source & GPLUnderstanding Open Source & GPL
Understanding Open Source & GPL
Zero Point Development
 
Setting up a local WordPress development environment
Setting up a local WordPress development environmentSetting up a local WordPress development environment
Setting up a local WordPress development environment
Zero Point Development
 
Choosing the best hosting package for WordPress
Choosing the best hosting package for WordPressChoosing the best hosting package for WordPress
Choosing the best hosting package for WordPress
Zero Point Development
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Vlad Lasky
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 

Viewers also liked (12)

WordPress News - March 2017
WordPress News - March 2017WordPress News - March 2017
WordPress News - March 2017
 
WordPress News - February 2017
WordPress News - February 2017WordPress News - February 2017
WordPress News - February 2017
 
WordPress Security Best Practices
WordPress Security Best PracticesWordPress Security Best Practices
WordPress Security Best Practices
 
Five Minute SEO
Five Minute SEOFive Minute SEO
Five Minute SEO
 
Scaling WordPress for High Traffic - Server Architecture
Scaling WordPress for High Traffic - Server ArchitectureScaling WordPress for High Traffic - Server Architecture
Scaling WordPress for High Traffic - Server Architecture
 
Monetising WordPress
Monetising WordPressMonetising WordPress
Monetising WordPress
 
Understanding Open Source & GPL
Understanding Open Source & GPLUnderstanding Open Source & GPL
Understanding Open Source & GPL
 
Setting up a local WordPress development environment
Setting up a local WordPress development environmentSetting up a local WordPress development environment
Setting up a local WordPress development environment
 
Choosing the best hosting package for WordPress
Choosing the best hosting package for WordPressChoosing the best hosting package for WordPress
Choosing the best hosting package for WordPress
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to WordPress Theming 101

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
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
 
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
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
David Bisset
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
advance theme development
advance theme developmentadvance theme development
advance theme development
1amitgupta
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
Steve Mortiboy
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
Dave Wallace
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
David Bisset
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
Laura Hartwig
 
W pthemes
W pthemesW pthemes
W pthemes
Becky Davis
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
certainstrings
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
Sitdhibong Laokok
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
Paul Bearne
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore
 
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
New Tricks
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
Up2 Technology
 

Similar to WordPress Theming 101 (20)

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 ...
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
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
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
advance theme development
advance theme developmentadvance theme development
advance theme development
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
W pthemes
W pthemesW pthemes
W pthemes
 
Arizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress ThemeArizona WP - Building a WordPress Theme
Arizona WP - Building a WordPress Theme
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
 
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
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 

Recently uploaded

1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 

Recently uploaded (20)

1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 

WordPress Theming 101

  • 1.
  • 2. “..a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog. These files are called template files. A Theme modifies the way the site is displayed, without modifying the underlying software.” Ref: https://codex.wordpress.org/Using_Themes
  • 3. Provides front end styling for page areas & content • header, footer and logo areas • fonts & colors • widget and sidebar locations • page layouts (or templates) • styles for blog posts and blog archives • additional stylistic details and custom post types
  • 4. 1,000’s of free themes at wordpress.org/themes all human vetted and all safe (no malware). Paid themes: • Themeforest • Elegant Themes • StudioPress There are many more paid sites – we vouch for these 3
  • 5. You can have a unique theme built for your site. We know a theme is a collection of files. Which files do what? How do they work together to “theme” your site?
  • 6. In a default installation all themes reside in the folder: /wp-content/themes/<unique_theme_name> However, this folder path can be changed at a site level. Use functions in theme code to find the correct folder. get_template_directory_uri() get_template_directory() get_stylesheet_directory_uri() get_stylesheet_directory() get_theme_root_uri() get_theme_root() get_stylesheet_uri() get_theme_roots() Ref: https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Themes
  • 7. Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/ Main types of theme template files are: • .php = PHP language files used to build template structure and output content (required) • .css = Style sheet files used to apply style to template structure and content (required) • .js = JavaScript files used for real-time user interface (UI) interaction & manipulation and much more (optional)
  • 8. Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/ A web server converts/renders PHP files to a static HTML page which is sent to the browser along with any corresponding CSS and other asset files such as images. Static HTML pages rendered from PHP files cannot interact with the user in the browser no matter how much they wiggle, move or click their mouse pointer at things on the page.
  • 9. Ref: https://developer.wordpress.org/themes/basics/template-hierarchy/ JavaScript runs in the browser and detects “events” such as window resize, mouse overs/movement/clicks, field selections/changes/input etc. JavaScript functions are bound to browser events allowing the HTML and CSS of the static page to now be changed dynamically in response to that event.
  • 10. Most important template file. Your theme must have an index.php This is the main blog article archive/page and top of the hierarchy (last to render) If there are no other php template files, index.php will be used to render the current web page.
  • 12. 2nd most important theme file. Your theme must have a style.css This file contains the theme name, version, description and license type that is displayed on the Appearance > Themes dashboard panel.
  • 13. Other primary templates are: • archive.php The archive template is used when visitors request posts by category, author, or date. • single.php The single post template is used when a visitor requests a single post. • page.php The page template is used when visitors request individual pages, which are a built-in template.
  • 14. Other primary templates are: • singular.php The singular template is used for posts when single.php is not found, or for pages when page.php are not found. • home.php The home page template is the front page by default. If you do not set WordPress to use a static front page, this template is used to show latest posts. • front-page.php The front page template is always used as the site front page if it exists, regardless of what settings on Admin > Settings > Reading.
  • 15. Other primary templates are: • comments.php The comments template. • 404.php The 404 template is used when WordPress cannot find a post, page, or other content that matches the visitor’s request. • search.php The search results template is used to display a visitor’s search results.
  • 16. Needs to be in the root directory of your theme. /wp-content/themes/<unique_theme_name>/style.css WordPress uses the header comment section of a style.css to display information about the theme in the Appearance > Themes dashboard panel.
  • 17. These header comments in style.css are required. There are more you can use. /* Theme Name: Twenty Sixteen Author: the WordPress Team Description: Twenty Sixteen is a modernised take on an ever- popular WordPress layout Version: 1.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentysixteen */ Ref: https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/
  • 18.
  • 19. There is no official required theme folder structure. Here’s an example based on Twenty Sixteen. Primary template files are located in the root of your theme folder. Assets are in a separate sub folder. assets (dir) - css (dir) - images (dir) - js (dir) template-parts (dir) - footer (dir) - header (dir) - navigation (dir) - page (dir) - post (dir) 404.php archive.php footer.php front-page.php functions.php header.php index.php page.php README.txt rtl.css screenshot.png single.php style.css
  • 20. Template tags are used within themes to retrieve content from your database. They help you to avoid hard coding content into template files. A template tag is broken up into three parts: • A PHP code tag • A WordPress function • Optional parameters Ref: https://developer.wordpress.org/themes/basics/template-tags/
  • 21. Printing the header.php file using get_header(): <?php get_header(); ?> Printing the blog site title (Settings > General): <?php bloginfo(‘name’); ?> Other template tags: the_content() the_excerpt() next_post() previous_post()
  • 22. The Loop is the default mechanism WordPress uses for outputting posts through a theme’s template files. The Loop extracts the data for each post from the WordPress database and inserts the appropriate information in place of each template tag. Any HTML or PHP code in The Loop will be processed for each post. Ref: https://developer.wordpress.org/themes/basics/the-loop/
  • 23. if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; else : _e( 'Sorry, no posts matched your criteria.', 'textdomain' ); endif;
  • 24. The functions.php file is where you add unique features to your WordPress theme. It can be used to hook into the core functions of WordPress to make your theme more modular, extensible, and functional. Each theme has its own functions file, but only code in the active theme’s functions.php is actually run. If your theme already has a functions file, you can add code to it. Ref: https://developer.wordpress.org/themes/basics/theme-functions/
  • 25. if ( ! function_exists( 'myfirsttheme_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. */ function myfirsttheme_setup() { /** * Make theme available for translation. * Translations can be placed in the /languages/ directory. */ load_theme_textdomain( 'myfirsttheme', get_template_directory() . '/languages' ); } endif; // myfirsttheme_setup add_action( 'after_setup_theme', 'myfirsttheme_setup' ); Ref: https://developer.wordpress.org/themes/basics/theme-functions/
  • 26. You may want to create additional style sheet or JavaScript files to enhance your theme. The proper way to add scripts and styles to your theme is to enqueue them in the functions.php file. You do not add them manually to the header.php file as you would with an HTML page. Ref: https://developer.wordpress.org/themes/basics/including-css-javascript
  • 27. Function: wp_enqueue_style( $handle, $src, $deps, $ver, $media ); Parameters: • $handle is simply the name of the stylesheet. • $src is where it is located. The rest of the parameters are optional. • $deps refers to whether or not this stylesheet is dependent on another stylesheet. If this is set, this stylesheet will not be loaded unless its dependent stylesheet is loaded first. • $ver sets the version number. • $media specify type of media to load, such as ‘all’, ‘screen’, or ‘print’ Basic function use: wp_enqueue_style( 'style', get_stylesheet_uri() );
  • 28. Function: wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); Parameters: • $handle is simply the name of the script. • $src is where it is located. The rest of the parameters are optional. • $deps is an array that can handle any script that your new script depends on, such as jQuery. • $ver sets the version number. • $in_footer is a boolean parameter (true/false) that allows you to place your scripts in the footer of your HTML document rather then in the header Basic function use: wp_enqueue_script( script', get_template_directory_uri() );
  • 29. Styles and scripts are usually loaded on an action hook. E.g. /** * Proper way to enqueue scripts and styles */ function wpdocs_theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );
  • 30. Can be used in your template files to alter the display of content depending on the conditions that the current page matches. Display a different greeting for logged in/out users. if ( is_user_logged_in() ): echo 'Welcome, registered user!'; else: echo 'Welcome, visitor!'; endif; Ref: https://developer.wordpress.org/themes/basics/conditional-tags/
  • 31. Developing your theme, so it can easily be translated into other languages. To make a string translatable you have to wrap the original strings in a set of special functions that use your uniquely defined text domain. The text domain is a unique identifier, which makes sure WordPress can distinguish between all loaded translations. Ref: https://developer.wordpress.org/themes/functionality/internationalization/
  • 32. Rather than use English only output: echo 'Your city is $city.‘ Run it through the __() PHP gettext library for translation using the my-theme text domain: printf( __( 'Your city is %s.', 'my-theme' ), $city );
  • 33. A child theme allows you to change small aspects of your site’s appearance yet still preserve your theme’s look and functionality. Parent Theme A parent theme is a complete theme which includes all of the required WordPress template files and assets for the theme to work Ref: https://developer.wordpress.org/themes/advanced-topics/child-themes/
  • 34. Inherits the look and feel of the parent theme and all of its functions, but can be used to make modifications to any part of the theme. In this way, customizations are kept separate from the parent theme’s files. Using a child theme lets you upgrade/override the parent theme without affecting the customizations you’ve made to your site.
  • 35. Example: You may have bought a premium theme and created a child theme to tweak a few styles and pages. A major bug is found in the parent theme and fixed by the author. An update is available in the dashboard.
  • 36. Example continued… You update the parent successfully. Your changes in the child theme are not deleted and still override the newly updated parent theme. Had you changed the parent theme, your changes would have been lost with the new update.
  • 37. WordPress theme frameworks are intended to be used as parent themes to aid the development of a child theme. They contain all the basic structures and functionalities you would need to create a theme but lack the styling and completeness you would expect to find in a working theme for a website. Ref: https://codex.wordpress.org/Theme_Frameworks
  • 38. As a parent theme, the framework can be updated to add new features and fix issues. Customizations to the child theme, hence the actual website, remain separate and unchanged, inheriting the new features and receiving framework issue fixes. Developers like using frameworks for consistency across sites and access to a larger community of other skilled framework developers.
  • 39. A popular commercial framework is Genesis. Other frameworks include: • Headway (drag & drop) • Divi (drag & drop) • Themify • Beans • Unyson
  • 40. Consider theme security as you add functionality. • Don’t trust any data. Validate all input from users, 3rd party APIs and the database and sanitize (escape) data before use or output. • Use WordPress API functions first. Core WordPress functions provide functionality of validating and sanitizing data. • Keep your theme up to date. Technology evolves and bugs get found and fixed over time. Ref: https://developer.wordpress.org/themes/theme-security/
  • 41. A theme must meet certain requirements to be included in the WordPress.org theme repository. Adhering to these requirements is best practice for theme development even if you don’t intend to submit to the repository at WordPress.org Accessibility, Code Quality, Use of Core Features, Documentation, Language, Licensing, etc… Ref: https://make.wordpress.org/themes/handbook/review/required/
  • 42. Themes are reviewed by the Theme Review Team. Before uploading, your theme must adhere to • Theme Review Guidelines • Testing With Sample Data • Theme Check Plugin Read the actual review process the team uses. Ref: https://developer.wordpress.org/themes/release/submitting-your-theme-to-wordpress-org/
  • 43. The most important thing about designing and developing a theme is that you have fun doing it!
  • 44. [Cover/Background] marktimemedia.com [9] marktimemedia.com [10] marktimemedia.com [43] imgur.com [Back Cover] zeropointdevelopment.com
  • 45.  20+ years in IT: Dev & SysOps  WordPress Developer since 2008  Plugins, APIs, Security & Systems Integrations  Organiser WPSyd & WordCamp Sydney zeropointdevelopment.com @DeveloperWil ♥ Pizza & Craft Beer