SlideShare uma empresa Scribd logo
1 de 79
Baixar para ler offline
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

Mais conteúdo relacionado

Último

VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130Suhani Kapoor
 
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonCheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonDelhi Call girls
 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Delhi Call girls
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsCharles Obaleagbon
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130Suhani Kapoor
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...kumaririma588
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
Cosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable BricksCosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable Bricksabhishekparmar618
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵anilsa9823
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...ranjana rawat
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptxVanshNarang19
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...Suhani Kapoor
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...Suhani Kapoor
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...Suhani Kapoor
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 

Último (20)

VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
 
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre GurgaonCheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Huda City Centre Gurgaon
 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past Questions
 
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
VIP Call Girls Service Bhagyanagar Hyderabad Call +91-8250192130
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
 
Cosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable BricksCosumer Willingness to Pay for Sustainable Bricks
Cosumer Willingness to Pay for Sustainable Bricks
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptx
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
 
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
 
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
 
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
VIP Russian Call Girls in Saharanpur Deepika 8250192130 Independent Escort Se...
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 

Destaque

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
 

Destaque (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