Modifying your themes design - Learning CSS - Atlanta WordPress users group

Evan Mullins
Evan MullinsWordPress Developer at Bluehost
Modifying Your
Themes Design
Learning CSS
Atlanta WordPress User Group - 9 March 2016
Introductions
Evan Mullins
Lead Web Developer
Brown Bag Marketing
@circlecube
circlecube.com
WordPress user since 2006
Full-time web developer since 2007
Internet
Throughout these slides almost everything is linked to related content or sources.
Click at will.
Internet
Internet
Tools
FTP Client
Text Editor
HTML
What is HTML?
Resources:
● W3
● HTML5 For Designers
● How to Code in HTML
● MDN: Learning Web Development
● Khan: HTML
● Codecademy: HTML
HTML - The Source
<div id="home">
<div class="content">
<article>
<h2 class="noBottom">Getting someone's attention is one thing.</h2>
<h3 class="noTop">Keeping it is what counts.</h3>
<p>A second may be all the time you've got in today's rapidly changing marketing landscape of diverse audiences,
channels and techniques. Simply put, your brand needs an integrated marketing partner. Brown Bag is fully integrated, full-
service and equipped for the digital and content age - creating experiences that keep your customers' attention while delivering
measurable results that keep yours.</p>
</article>
<div class="buttons">
<a href="https://www.brownbagmarketing.com/infographic/" class="btn btn-orange">Why Integrated Marketing</a>
<a href="https://www.brownbagmarketing.com/contact/" class="btn btn-orange">Work With Us</a>
</div>
</div>
</div>
HTML - In Browser
CSS
What is CSS and why do we use it?
Resources:
● W3
● CSS3 For Web Designers
● Learn To Code CSS
● CSS Tricks
● MDN: CSS
● Khan: CSS
● Codecademy: CSS
● CSS Specificity Calculator
CSS
h1, h2, h3, h4, h5 {
font-size: 26px;
font-weight: 100;
text-transform: uppercase;
margin: 30px 0;
}
.noBottom {
margin-bottom: 0px;
}
.noTop {
margin-top: 0px;
}
h3 {
text-transform: none;
font-family: "somefont";
}
.content {
width: 1024px;
max-width: 100%;
margin: 0 auto;
text-align: center;
}
CSS
Modifying your themes design - Learning CSS - Atlanta WordPress users group
PHP
What is PHP and how?
PHP
<div id="home">
<div class="content">
<article>
<h2 class="noBottom"><?php the_field('headline_1'); ?></h2>
<h3 class="noTop"><?php the_field('subheadline_1'); ?></h3>
<p><?php the_field('body_1'); ?></p>
</article>
<div class="buttons">
<a href="<?php the_field('button_1.1_link'); ?>" class="btn btn-orange"><?php the_field('button_1.
1_text'); ?></a>
<a href="<?php the_field('button_1.2_link'); ?>" class="btn btn-orange"><?php the_field('button_1.
2_text'); ?></a>
</div>
</div>
</div>
PHP
<div id="home">
<div class="content">
<article>
<h2 class="noBottom"><?php the_field('headline_1'); ?></h2>
<h3 class="noTop"><?php the_field('subheadline_1'); ?></h3>
<p><?php the_field('body_1'); ?></p>
</article>
<div class="buttons">
<a href="<?php the_field('button_1.1_link'); ?>" class="btn btn-orange"><?php the_field('button_1.
1_text'); ?></a>
<a href="<?php the_field('button_1.2_link'); ?>" class="btn btn-orange"><?php the_field('button_1.
2_text'); ?></a>
</div>
</div>
</div>
PHP
Inspect Element / Firebug
Using 'inspect element' and/or 'firebug' to
find and test.
Chrome dev tools
Inspect Element / Firebug
WordPress
As of February 2016 - More Usage Stats
Themes
WordPress Theme Editor
WordPress Theme Editor
Child Theme
Child Theme
A child theme is a theme that inherits the functionality and styling of another theme,
called the parent theme. Child themes are the recommended way of modifying an
existing theme.
● If you modify a theme directly and it is updated, then your modifications may be
lost. By using a child theme you will ensure that your modifications are preserved.
● Using a child theme can speed up development time.
● Using a child theme is a great way to learn about WordPress theme development.
Read More at https://codex.wordpress.org/Child_Themes
Child Theme
Child Theme - style.css
Child Theme - functions.php
Modifying Theme Styles
Typical modifications to themes and how to make them
Make the Logo Bigger
.logo {
width: 100%;
height: auto;
background: url(img/logo.png) center center no-repeat transparent;
background-size: contain;
}
Font Sizes
.site-branding .site-title a {
font-size: 20px; /* fixed size */
font-size: 2em; /* relative to parent font-size */
font-size: 2rem; /* relative to root font-size */
}
Color Edits - Links
a {
color: tomato;
}
a:hover {
color: rgba(130,203,45, .8);
}
a:visited {
color: #00cc33;
}
Modifying your themes design - Learning CSS - Atlanta WordPress users group
Color Edits - Buttons
Style the Widgets
.widget_meta {
display: none;
}
.widget_recent_comments {
padding: 1rem;
margin: 1rem 0 4rem;
}
.widget_recent_comments .widget-title {
background: black;
color: pink;
padding: 1rem;
}
Hide Elements
element {
display: none;
}
element {
opacity: 0;
}
element {
text-indent: -999rem;
}
Simple PHP Edits
Rearrange elements, remove elements, edit html tags…
If you want to change more than just the stylesheet, your child theme can override any
file in the parent theme: simply include a file of the same name in the child theme
directory, and it will override the equivalent file in the parent theme directory when
your site loads.
See the Template Hierarchy for details about how WordPress decides what template to use.
Questions
?
Thank You
Slides and code available at https://circlecube.com/says/2016/03/modify-your-theme-
learning-css-atlanta-wordpress/
1 of 42

More Related Content

What's hot(16)

Gmail tutorialsGmail tutorials
Gmail tutorials
albert ndicho203 views
Punch it Up with HTML and CSSPunch it Up with HTML and CSS
Punch it Up with HTML and CSS
mtlgirlgeeks16.7K views
Responsive WebsitesResponsive Websites
Responsive Websites
Joe Seifi19.4K views
Web development Training In Batra Computer CentreWeb development Training In Batra Computer Centre
Web development Training In Batra Computer Centre
Batra Computer Centre176 views
Pemrograman Web 4 - Bootstrap 3Pemrograman Web 4 - Bootstrap 3
Pemrograman Web 4 - Bootstrap 3
Nur Fadli Utomo419 views
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
Rahul Mishra1.8K views
Ppt of web developmentPpt of web development
Ppt of web development
bethanygfair46.5K views
Basic HTMLBasic HTML
Basic HTML
sunmitraeducation128 views
Web Design FundamentalsWeb Design Fundamentals
Web Design Fundamentals
Ahmed Faris1.1K views
HTML5 - An IntroductionHTML5 - An Introduction
HTML5 - An Introduction
Timmy Kokke1.2K views
Introduction to Django CMS Introduction to Django CMS
Introduction to Django CMS
Pim Van Heuven1.2K views
Responsive Design in the Real WorldResponsive Design in the Real World
Responsive Design in the Real World
Clarissa Peterson14.1K views

Similar to Modifying your themes design - Learning CSS - Atlanta WordPress users group

Html5 ux londonHtml5 ux london
Html5 ux londonTodd Zaki Warfel
3.5K views44 slides
Agile WordpressAgile Wordpress
Agile WordpressFilippo Dino
809 views66 slides
Fecc cg-cb-11.14.17 Fecc cg-cb-11.14.17
Fecc cg-cb-11.14.17 Thinkful
109 views27 slides

Similar to Modifying your themes design - Learning CSS - Atlanta WordPress users group(20)

Html5 ux londonHtml5 ux london
Html5 ux london
Todd Zaki Warfel3.5K views
Agile WordpressAgile Wordpress
Agile Wordpress
Filippo Dino809 views
Fecc cg-cb-11.14.17 Fecc cg-cb-11.14.17
Fecc cg-cb-11.14.17
Thinkful109 views
Fecrash10:3:17 sdFecrash10:3:17 sd
Fecrash10:3:17 sd
Thinkful70 views
wd project.pptxwd project.pptx
wd project.pptx
dsffsdf125 views
Webtech File.docxWebtech File.docx
Webtech File.docx
gambleryeager1 view
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHP
randyhoyt2.2K views
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
Laura Hartwig2.7K views
Core CSS3Core CSS3
Core CSS3
Rachel Andrew2.3K views
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjc
hjc 965 views
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
Denise Jacobs37.2K views

Modifying your themes design - Learning CSS - Atlanta WordPress users group

  • 1. Modifying Your Themes Design Learning CSS Atlanta WordPress User Group - 9 March 2016
  • 2. Introductions Evan Mullins Lead Web Developer Brown Bag Marketing @circlecube circlecube.com WordPress user since 2006 Full-time web developer since 2007
  • 3. Internet Throughout these slides almost everything is linked to related content or sources. Click at will.
  • 9. HTML What is HTML? Resources: ● W3 ● HTML5 For Designers ● How to Code in HTML ● MDN: Learning Web Development ● Khan: HTML ● Codecademy: HTML
  • 10. HTML - The Source <div id="home"> <div class="content"> <article> <h2 class="noBottom">Getting someone's attention is one thing.</h2> <h3 class="noTop">Keeping it is what counts.</h3> <p>A second may be all the time you've got in today's rapidly changing marketing landscape of diverse audiences, channels and techniques. Simply put, your brand needs an integrated marketing partner. Brown Bag is fully integrated, full- service and equipped for the digital and content age - creating experiences that keep your customers' attention while delivering measurable results that keep yours.</p> </article> <div class="buttons"> <a href="https://www.brownbagmarketing.com/infographic/" class="btn btn-orange">Why Integrated Marketing</a> <a href="https://www.brownbagmarketing.com/contact/" class="btn btn-orange">Work With Us</a> </div> </div> </div>
  • 11. HTML - In Browser
  • 12. CSS What is CSS and why do we use it? Resources: ● W3 ● CSS3 For Web Designers ● Learn To Code CSS ● CSS Tricks ● MDN: CSS ● Khan: CSS ● Codecademy: CSS ● CSS Specificity Calculator
  • 13. CSS h1, h2, h3, h4, h5 { font-size: 26px; font-weight: 100; text-transform: uppercase; margin: 30px 0; } .noBottom { margin-bottom: 0px; } .noTop { margin-top: 0px; } h3 { text-transform: none; font-family: "somefont"; } .content { width: 1024px; max-width: 100%; margin: 0 auto; text-align: center; }
  • 14. CSS
  • 16. PHP What is PHP and how?
  • 17. PHP <div id="home"> <div class="content"> <article> <h2 class="noBottom"><?php the_field('headline_1'); ?></h2> <h3 class="noTop"><?php the_field('subheadline_1'); ?></h3> <p><?php the_field('body_1'); ?></p> </article> <div class="buttons"> <a href="<?php the_field('button_1.1_link'); ?>" class="btn btn-orange"><?php the_field('button_1. 1_text'); ?></a> <a href="<?php the_field('button_1.2_link'); ?>" class="btn btn-orange"><?php the_field('button_1. 2_text'); ?></a> </div> </div> </div>
  • 18. PHP <div id="home"> <div class="content"> <article> <h2 class="noBottom"><?php the_field('headline_1'); ?></h2> <h3 class="noTop"><?php the_field('subheadline_1'); ?></h3> <p><?php the_field('body_1'); ?></p> </article> <div class="buttons"> <a href="<?php the_field('button_1.1_link'); ?>" class="btn btn-orange"><?php the_field('button_1. 1_text'); ?></a> <a href="<?php the_field('button_1.2_link'); ?>" class="btn btn-orange"><?php the_field('button_1. 2_text'); ?></a> </div> </div> </div>
  • 19. PHP
  • 20. Inspect Element / Firebug Using 'inspect element' and/or 'firebug' to find and test. Chrome dev tools
  • 21. Inspect Element / Firebug
  • 23. As of February 2016 - More Usage Stats
  • 28. Child Theme A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme. ● If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved. ● Using a child theme can speed up development time. ● Using a child theme is a great way to learn about WordPress theme development. Read More at https://codex.wordpress.org/Child_Themes
  • 30. Child Theme - style.css
  • 31. Child Theme - functions.php
  • 32. Modifying Theme Styles Typical modifications to themes and how to make them
  • 33. Make the Logo Bigger .logo { width: 100%; height: auto; background: url(img/logo.png) center center no-repeat transparent; background-size: contain; }
  • 34. Font Sizes .site-branding .site-title a { font-size: 20px; /* fixed size */ font-size: 2em; /* relative to parent font-size */ font-size: 2rem; /* relative to root font-size */ }
  • 35. Color Edits - Links a { color: tomato; } a:hover { color: rgba(130,203,45, .8); } a:visited { color: #00cc33; }
  • 37. Color Edits - Buttons
  • 38. Style the Widgets .widget_meta { display: none; } .widget_recent_comments { padding: 1rem; margin: 1rem 0 4rem; } .widget_recent_comments .widget-title { background: black; color: pink; padding: 1rem; }
  • 39. Hide Elements element { display: none; } element { opacity: 0; } element { text-indent: -999rem; }
  • 40. Simple PHP Edits Rearrange elements, remove elements, edit html tags… If you want to change more than just the stylesheet, your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. See the Template Hierarchy for details about how WordPress decides what template to use.
  • 42. Thank You Slides and code available at https://circlecube.com/says/2016/03/modify-your-theme- learning-css-atlanta-wordpress/