Course

Theme development

Build a WordPress theme from scratch using a fictional company site as your project: template hierarchy, functions.php, custom post types, and custom fields — the real-world patterns, all in one build.

Start learning

Let's build a theme for a company site

Theme development · Lesson 1 / 15

Setup: what to build and the tools4 lessons

  1. 01Let's build a theme for a company site
  2. 02Stand up WordPress inside your computer with Local
  3. 03Make a minimal theme and activate itstyle.cssindex.phpTheme Name
  4. 04A super-intro to PHP for themes<?php ?>echowhileif

Framing with templates6 lessons

  1. 05The template hierarchy — each URL gets its own file in chargefront-page.phpsingle.phparchive.phphome.php
  2. 06Splitting shared parts into header.php and footer.phpheader.phpfooter.phpwp_head()wp_footer()
  3. 07Building the top page with front-page.phpfront-page.phpWP_Query
  4. 08Building an About page with page.phppage.phpthe_content()the_title()
  5. 09Building the news list and detail viewshome.phpsingle.phpthe_permalink()
  6. 10Category lists and the 404 pagecategory.php404.phpthe_category()

Wiring features in functions.php4 lessons

  1. 11Wiring up functions.php and CSS the right wayfunctions.phpwp_enqueue_style()add_theme_support()
  2. 12A navigation menu you can edit from the admin screenregister_nav_menus()wp_nav_menu()current-menu-item
  3. 13Creating "products" with a custom post typeregister_post_type()archive-shohin.phpsingle-shohin.php
  4. 14Giving products their info with custom fieldsget_post_meta()esc_html()

Finishing up1 lesson

  1. 15Finishing the theme, and the road from herescreenshot.png