Background
Before this site moved to Astro, it ran on WordPress with a custom theme. I wanted a theme that was:
- Flexible, with lots of options for formatting content
- Well-documented and well laid-out
- Accessible
Implementation
I built the theme on top of WordPress’s Twenty Twenty-One default theme, which offered a flexible full-width container, well-organized template parts, thorough inline documentation, and an accessibility-first design.
Project Template
As part of the theme, I wrote content-project.php, a template part used on both the project archive and individual project pages. It handled:
- Conditional logic for singular vs. archive views
- Custom field handling for project completion dates using PHP’s
DateTimeclass - Display of the custom taxonomies attached to each project
- WordPress template functions for titles, excerpts, and featured images
This template work fed directly into the Project CPT and Custom Taxonomies project.