Lesson 3

Building a Theme

What is a theme?

The theme is the presentation layer. Ideally, it should handle:

  • Fonts
  • Colors
  • Layouts
  • Responsiveness

What is a theme not?

A theme shouldn't manage data, or types of data, like:

  • Custom Post Types
  • Custom Taxonomies
  • User Management

Where to begin?

There are three (sane) options.

Child Themes

  • Inherits the properties of another theme (the parent)
  • Good starting point for beginners
  • It's like theme development with a net

Starter Themes

  • Unstyled, bare bones
  • Might contain UI elements of popular front-end frameworks
  • Also contains common templates you need, plus other functionality

Theme Frameworks

  • Somewhere between the two
  • Usually operate on a child theme model
  • Give you additional functionality and often minimal styling

Sass

  • CSS Preprocessor
  • Still CSS at its heart. Know the rules.
  • Not the only preprocessor out there, but arguably most popular and "blessed" by WordPress

Responsive Web Design

Let's build a theme!

  • Page templates
  • Navigation menus
  • Archives
  • Single posts
  • Sidebars and widgets
  • WP_Query