Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modifying Your Theme's Design - Learning CSS - Atlanta WordPress Users Group

Modifying Your Theme's Design - Learning CSS - Atlanta WordPress Users Group

Continuing our Theme discussion, this meetup is intended to give you a first hand look at modifying your Themes look and feel.

We'll be showing you how to make typical changes to existing themes. We will not be showing you how to create your own theme from scratch, though we will have a meetup later in the year to do that.

During this meetup we will discuss:

• What is CSS and why do we use it?

• What are 'typical' modifications to themes and how to make them

• Using 'inspect element' and/or 'firebug' to find and test

• Correct way to change Fonts

• Simple color theory and design

Evan Mullins

March 09, 2016
Tweet

More Decks by Evan Mullins

Other Decks in Programming

Transcript

  1. Who am I? Evan Mullins Lead Web Developer Brown Bag

    Marketing @circlecube circlecube.com WordPress user since 2006 Full-time web developer since 2007
  2. FTP

  3. HTML <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>
  4. 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; }
  5. CSS

  6. 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>
  7. 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>
  8. PHP

  9. 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.
  10. Make the Logo Bigger .logo { width: 100%; height: auto;

    background: url(img/logo.png) center center no-repeat transparent; background-size: contain; }
  11. 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 */ }
  12. Color Edits - Links a { color: tomato; } a:hover

    { color: rgba(130,203,45, .8); } a:visited { color: #00cc33; }
  13. 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; }
  14. Hide Elements element { display: none; } element { opacity:

    0; } element { text-indent: -999rem; }
  15. 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.