SlideShare ist ein Scribd-Unternehmen logo
1 von 79
Downloaden Sie, um offline zu lesen
WordPress Theme Mechanics
Because sometimes you need to look under the hood
Common Challenges
• Change fonts and typography? (font size, font color, font face, line spacing).
• Change the background color on a page.
• Customize the theme header (or footer).
• Modify the site layout - change column widths, margins, padding.
In Today’s Webinar
• How WordPress works (conceptually).
• Understanding the WordPress template system.
• Customizing your theme the CSS way.
• How to make a child theme.
• Almost no PHP.
My Assumptions
• You know a little about WordPress
• Adding posts and pages
• Installing and activating plugins and themes
• You have some very basic knowledge of common web terminology
• Primarily HTML & CSS
How WordPress Works
What are the limits of
WordPress Themes??
What are the limits of
HTML and CSS?
With just a little bit of JavaScript?
Anything is possible*
* when you know the secrets
of the WP theme system
(and HTML and CSS)
Theme Secrets Revealed
Inside the Theme Folder
Decoding the Template System
Home | About | Contact Us
Site Name
Site tagline
Privacy Policy * Terms of Service * Copyright
Post Title
Post Date * Post Author
Dynamically aggregate resource-leveling architectures vis-a-vis
cutting-edge systems. Enthusiastically drive parallel value rather than
team building growth strategies. Interactively pursue functional meta-
services rather than frictionless technology. Authoritatively strategize
proactive vortals via cross-media web-readiness. Assertively
communicate flexible benefits via magnetic deliverables.
Synergistically customize team driven leadership for frictionless
vortals. Interactively leverage other's process-centric collaboration
and idea-sharing for excellent channels. Proactively unleash premium
leadership skills before market-driven information. Seamlessly brand
equity invested networks via front-end e-business. Seamlessly
maintain economically sound schemas with 24/7 opportunities.
Holisticly provide access to worldwide ideas without intuitive content.
Dynamically myocardinate front-end benefits with clicks-and-mortar
models. Conveniently pontificate professional technology and
extensive systems. Energistically brand flexible customer service
rather than prospective alignments. Collaboratively supply
transparent ROI whereas scalable e-commerce.
Proactively myocardinate fully tested meta-services without adaptive
e-commerce. Efficiently leverage other's enabled total linkage with
global channels.
Filed Under: Category Name
Templates
are patterns
for your website
Every type of page
has a template
Header
Footer
Sidebar
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Home Page
Lists posts from newest to oldest, blog style
(aka index.php, home.php, front-page.php)
Header
Footer
Sidebar
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
September 1, 2013 * By Author Name
File Under: Category
Tag, Tag, Tag, Tag
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Leave a Comment:
Post
Displays a single post and comments
(aka single.php)
Header
Footer
Sidebar
Page Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
September 1, 2013 * By Author Name
File Under: Category
Tag, Tag, Tag, Tag
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Leave a Comment:
Page
Displays a single page
(aka page.php*)
* if page.php doesn’t exist,WordPress uses
single.php for pages
Header
Footer
Sidebar
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Post Title
Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac
cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit
amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur
et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod.
Archive: Category, Tag, Date, or Author
Archives
(aka archive.php, category.php,
tag.php, author.php)
Getting More Specific
category.php → category-baking.php
page.php → page-about.php
single.php → single-products.php
Templates for Page Parts
Page Content
Header
Footer
Sidebar
Header
(aka header.php)
Page Content
Header
Footer
Sidebar
Footer
(aka footer.php)
Page Content
Header
Footer
Sidebar
Sidebar
(aka sidebar.php)
Content
(aka content.php, content-audio.php, etc.)
Page Content
Header
Footer
Sidebar
Template Master Guide
The Template Hierarchy Diagram (don’t let the name scare you)
h"p://codex.wordpress.org/Template_Hierarchy
h"p://wphierarchy.com/
What about those other
files & folders?
functions.php
• Used to enable theme features (menus, widget areas, featured images, etc.).
• Can be used to do anything a plugin can do.
style.css
• The most important file in your theme.
• Controls all design elements:
• All type settings (style, size, color, line spacing, margins, etc.).
• Positioning of layout, sidebars, header, footer, and everything else.
• Anything you think of as “design” is probably controlled by CSS
The same WordPress
site without CSS...
Customizing Your Theme
Theme Customizer
The “No Code” Way to Customize
But what about bigger changes?
CSS
It’s code, but at least it’s not PHP
h1.site-­‐;tle	
  {
color:	
  #040393;
font-­‐size:	
  2em;
font-­‐style:	
  italic;
}
.site-­‐main	
  {
background-­‐color:	
  #011033;
}
div#navbar	
  {
	
  	
  	
  background:	
  #990000;
}
.nav-­‐menu	
  li	
  a	
  {
	
  	
  color:	
  #fff;
}
.site-­‐header	
  .home-­‐link	
  {
	
  	
  	
  min-­‐height:	
  150px;
}
How do I know what
CSS classes to use?
h"p://geOirebug.com
Before you change any
CSS or
a theme template
Start With a Child Theme
• A child theme protects your customizations.
• Child theme templates and styles override the parent theme.
/wp-­‐content/themes/
/wp-­‐content/themes/
/wp-­‐content/themes/mychildtheme/
/wp-­‐content/themes/twentythirteen/style.css
/wp-­‐content/themes/mychildtheme/style.css
/wp-­‐content/themes/mychildtheme/style.css
/wp-­‐content/themes/mychildtheme/style.css
PHP
I said *almost* no PHP
When You Need to “Know” PHP
• To change some common content element on a page (“Leave a comment”)
• To add or remove content elements on a page (title, date, category, etc.)
• Add a WordPress feature (menu, widget area, featured image, etc.)
Inside a Template File
• PHP
• HTML
• Sometimes JavaScript
• CSS is in a stylesheet not the templates
Ready to Dig Deeper Into
WordPress Themes?
Theme Mechanics Workshop
• Five weekly sessions on WordPress themes (60 minutes each).
• In-depth coverage of WordPress theme topics.
• Learn how to customize your themes.
• Q&A with each session.
• Replays available in workshop member portal.
• Session content will be shaped by your feedback and needs.
Workshop Topics
• Setting up a WordPress theme lab on your PC or Mac.
• Working with the WordPress loop.
• Customizing theme templates: add common features like menus, widget
areas, custom headers and footers,WP customization features (with child
themes, of course).
• Creating custom page templates.
• Framework and starter themes.What they are and when to use them.
• Debugging. Fixing stuff when it breaks.
Prerequisites
• You should be familiar working with WordPress.
• You should know a bit about HTML and CSS.
• PHP knowledge is not essential, but you should expect to learn some along
the way.
More Information at:
http://workshop.wpapprentice.com
Code Editor Features
• Color code highlighting
• Line numbering
• Code completion
• Unicode support

Weitere ähnliche Inhalte

Kürzlich hochgeladen

1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改yuu sss
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree ttt fff
 
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,Aginakm1
 
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10uasjlagroup
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social MediaD SSS
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryWilliamVickery6
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptMaryamAfzal41
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一diploma 1
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...katerynaivanenko1
 
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一A SSS
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdfSwaraliBorhade
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证nhjeo1gg
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfSumit Lathwal
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一F dds
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfShivakumar Viswanathan
 
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
PORTAFOLIO   2024_  ANASTASIYA  KUDINOVAPORTAFOLIO   2024_  ANASTASIYA  KUDINOVA
PORTAFOLIO 2024_ ANASTASIYA KUDINOVAAnastasiya Kudinova
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCRdollysharma2066
 
Mookuthi is an artisanal nose ornament brand based in Madras.
Mookuthi is an artisanal nose ornament brand based in Madras.Mookuthi is an artisanal nose ornament brand based in Madras.
Mookuthi is an artisanal nose ornament brand based in Madras.Mookuthi
 

Kürzlich hochgeladen (20)

1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
 
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10
CREATING A POSITIVE SCHOOL CULTURE CHAPTER 10
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William Vickery
 
cda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis pptcda.pptx critical discourse analysis ppt
cda.pptx critical discourse analysis ppt
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
办理(USYD毕业证书)澳洲悉尼大学毕业证成绩单原版一比一
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
 
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一
办理学位证(NTU证书)新加坡南洋理工大学毕业证成绩单原版一比一
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdf
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
 
FiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdfFiveHypotheses_UIDMasterclass_18April2024.pdf
FiveHypotheses_UIDMasterclass_18April2024.pdf
 
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
PORTAFOLIO   2024_  ANASTASIYA  KUDINOVAPORTAFOLIO   2024_  ANASTASIYA  KUDINOVA
PORTAFOLIO 2024_ ANASTASIYA KUDINOVA
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
 
Mookuthi is an artisanal nose ornament brand based in Madras.
Mookuthi is an artisanal nose ornament brand based in Madras.Mookuthi is an artisanal nose ornament brand based in Madras.
Mookuthi is an artisanal nose ornament brand based in Madras.
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

WordPress Theme Mechanics

  • 1. WordPress Theme Mechanics Because sometimes you need to look under the hood
  • 2. Common Challenges • Change fonts and typography? (font size, font color, font face, line spacing). • Change the background color on a page. • Customize the theme header (or footer). • Modify the site layout - change column widths, margins, padding.
  • 3. In Today’s Webinar • How WordPress works (conceptually). • Understanding the WordPress template system. • Customizing your theme the CSS way. • How to make a child theme. • Almost no PHP.
  • 4. My Assumptions • You know a little about WordPress • Adding posts and pages • Installing and activating plugins and themes • You have some very basic knowledge of common web terminology • Primarily HTML & CSS
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. What are the limits of WordPress Themes??
  • 11. What are the limits of HTML and CSS? With just a little bit of JavaScript?
  • 12.
  • 13. Anything is possible* * when you know the secrets of the WP theme system (and HTML and CSS)
  • 16.
  • 18. Home | About | Contact Us Site Name Site tagline Privacy Policy * Terms of Service * Copyright Post Title Post Date * Post Author Dynamically aggregate resource-leveling architectures vis-a-vis cutting-edge systems. Enthusiastically drive parallel value rather than team building growth strategies. Interactively pursue functional meta- services rather than frictionless technology. Authoritatively strategize proactive vortals via cross-media web-readiness. Assertively communicate flexible benefits via magnetic deliverables. Synergistically customize team driven leadership for frictionless vortals. Interactively leverage other's process-centric collaboration and idea-sharing for excellent channels. Proactively unleash premium leadership skills before market-driven information. Seamlessly brand equity invested networks via front-end e-business. Seamlessly maintain economically sound schemas with 24/7 opportunities. Holisticly provide access to worldwide ideas without intuitive content. Dynamically myocardinate front-end benefits with clicks-and-mortar models. Conveniently pontificate professional technology and extensive systems. Energistically brand flexible customer service rather than prospective alignments. Collaboratively supply transparent ROI whereas scalable e-commerce. Proactively myocardinate fully tested meta-services without adaptive e-commerce. Efficiently leverage other's enabled total linkage with global channels. Filed Under: Category Name Templates are patterns for your website
  • 19. Every type of page has a template
  • 20. Header Footer Sidebar Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Home Page Lists posts from newest to oldest, blog style (aka index.php, home.php, front-page.php)
  • 21. Header Footer Sidebar Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. September 1, 2013 * By Author Name File Under: Category Tag, Tag, Tag, Tag Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Leave a Comment: Post Displays a single post and comments (aka single.php)
  • 22. Header Footer Sidebar Page Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. September 1, 2013 * By Author Name File Under: Category Tag, Tag, Tag, Tag Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Leave a Comment: Page Displays a single page (aka page.php*) * if page.php doesn’t exist,WordPress uses single.php for pages
  • 23. Header Footer Sidebar Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Post Title Normal Paragraph, Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod. Archive: Category, Tag, Date, or Author Archives (aka archive.php, category.php, tag.php, author.php)
  • 24. Getting More Specific category.php → category-baking.php page.php → page-about.php single.php → single-products.php
  • 29. Content (aka content.php, content-audio.php, etc.) Page Content Header Footer Sidebar
  • 30. Template Master Guide The Template Hierarchy Diagram (don’t let the name scare you)
  • 33. What about those other files & folders?
  • 34. functions.php • Used to enable theme features (menus, widget areas, featured images, etc.). • Can be used to do anything a plugin can do.
  • 35. style.css • The most important file in your theme. • Controls all design elements: • All type settings (style, size, color, line spacing, margins, etc.). • Positioning of layout, sidebars, header, footer, and everything else. • Anything you think of as “design” is probably controlled by CSS
  • 36.
  • 37. The same WordPress site without CSS...
  • 38.
  • 40. Theme Customizer The “No Code” Way to Customize
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. But what about bigger changes?
  • 46. CSS It’s code, but at least it’s not PHP
  • 47.
  • 48.
  • 49. h1.site-­‐;tle  { color:  #040393; font-­‐size:  2em; font-­‐style:  italic; }
  • 51. div#navbar  {      background:  #990000; } .nav-­‐menu  li  a  {    color:  #fff; }
  • 52. .site-­‐header  .home-­‐link  {      min-­‐height:  150px; }
  • 53. How do I know what CSS classes to use?
  • 54.
  • 55.
  • 57.
  • 58. Before you change any CSS or a theme template
  • 59. Start With a Child Theme • A child theme protects your customizations. • Child theme templates and styles override the parent theme.
  • 67.
  • 68.
  • 69.
  • 71. When You Need to “Know” PHP • To change some common content element on a page (“Leave a comment”) • To add or remove content elements on a page (title, date, category, etc.) • Add a WordPress feature (menu, widget area, featured image, etc.)
  • 72. Inside a Template File • PHP • HTML • Sometimes JavaScript • CSS is in a stylesheet not the templates
  • 73.
  • 74. Ready to Dig Deeper Into WordPress Themes?
  • 75. Theme Mechanics Workshop • Five weekly sessions on WordPress themes (60 minutes each). • In-depth coverage of WordPress theme topics. • Learn how to customize your themes. • Q&A with each session. • Replays available in workshop member portal. • Session content will be shaped by your feedback and needs.
  • 76. Workshop Topics • Setting up a WordPress theme lab on your PC or Mac. • Working with the WordPress loop. • Customizing theme templates: add common features like menus, widget areas, custom headers and footers,WP customization features (with child themes, of course). • Creating custom page templates. • Framework and starter themes.What they are and when to use them. • Debugging. Fixing stuff when it breaks.
  • 77. Prerequisites • You should be familiar working with WordPress. • You should know a bit about HTML and CSS. • PHP knowledge is not essential, but you should expect to learn some along the way.
  • 79. Code Editor Features • Color code highlighting • Line numbering • Code completion • Unicode support