Basic Theme Development¶
Learn to create modern WordPress block themes using Full Site Editing (FSE), understanding theme.json, block templates, patterns, and the future of WordPress theme development.
WordPress Block Theme Development Study Plan¶
This comprehensive 6-week study plan focuses on Block Themes (Full Site Editing), the modern standard for WordPress theme development. Based on the official WordPress Theme Developer Handbook.
Note: This plan focuses on modern Block Themes. For legacy Classic Theme development, see the Appendix at the end.
Table of Contents¶
- Week 1: Block Theme Fundamentals
- Week 2: Block Templates & Template Parts
- Week 3: Block Patterns & Style Variations
- Week 4: Advanced theme.json & Customization
- Week 5: Query Loop, Navigation & Dynamic Content
- Week 6: Performance, Accessibility & Distribution
- Week 7: Final Project (Optional)
- Additional Resources
Week 1: Block Theme Fundamentals¶
Goal: Understand what block themes are and create your first minimal block theme
Day 1-2: Introduction to Block Themes & FSE¶
๐ Reading:
๐ป Setup:
- Set up local development environment with WordPress 6.0+
- Install WordPress with block theme support
โ๏ธ Practice:
- Explore existing block themes (Twenty Twenty-Four, Twenty Twenty-Three)
- Navigate the Site Editor interface
- Understand the difference between block themes and classic themes
Day 3-4: theme.json - The Core Configuration¶
๐ Reading:
- theme.json Overview
- Global Settings
- Global Styles
- Color Palettes
- Typography Settings
- Spacing & Layout
โ๏ธ Practice:
- Create a basic theme.json with custom colors
- Add custom font sizes and font families
- Configure spacing and layout settings
- Test your settings in the Site Editor
Day 5: Minimum Block Theme Structure¶
๐ Reading:
๐ Required Files:
my-theme/
โโโ style.css (theme header)
โโโ theme.json (configuration)
โโโ templates/
โ โโโ index.html (required template)
โโโ parts/ (template parts directory)
โ๏ธ Practice:
- Create your first minimal block theme from scratch
- Add proper style.css header information
- Create a basic theme.json
- Build a simple index.html template
Day 6-7: Weekend Project¶
Project: Create a "Minimal Blog" block theme
Requirements:
- โ Proper style.css header with theme information
- โ Complete theme.json with:
- Custom color palette (5+ colors)
- Typography settings (2+ font sizes)
- Spacing scale
- โ Basic index.html template
- โ Header template part (parts/header.html)
- โ Footer template part (parts/footer.html)
- โ Screenshot (1200x900px)
- โ Basic documentation
Deliverable: A working block theme that can be activated and displays a simple blog layout.
Week 2: Block Templates & Template Parts¶
Goal: Master the template system and create a complete template hierarchy
Day 1-2: Introduction to Templates¶
๐ Reading:
๐ Topics:
- Understanding the template system
- How templates work in block themes
- Template file structure and naming conventions
๐ Core Templates:
index.html(required - fallback for all views)home.html(blog homepage)single.html(single post)page.html(static pages)archive.html(archives)search.html(search results)404.html(not found page)
โ๏ธ Practice:
- Create all core templates using HTML and block markup
- Test each template by viewing different page types
- Understand when each template is used
Day 3: Template Hierarchy¶
๐ Reading:
๐ Topics:
- How WordPress chooses which template to use
- Template hierarchy for block themes vs classic themes
- Fallback templates
- Template specificity
๐ฏ Specific Templates:
- Custom post types:
single-{post-type}.html - Taxonomies:
taxonomy-{taxonomy}.html,category-{slug}.html - Authors:
author-{nicename}.html - Dates:
date.html - Custom templates: templates with
Template Namein comments
โ๏ธ Practice:
- Create a complete template hierarchy for a blog
- Test template hierarchy by creating different content types
- Create custom templates for specific categories
Day 4-5: Template Parts¶
๐ Reading:
๐ Common Template Parts:
parts/header.html- Site header with logo and navigationparts/footer.html- Site footer with copyright and linksparts/sidebar.html- Sidebar contentparts/post-meta.html- Post metadata (author, date, categories)parts/comments.html- Comments section
๐ Topics:
- Creating reusable template parts
- Using template parts in templates
- Creating dynamic template parts
- Template part areas (header, footer, general)
โ๏ธ Practice:
- Create reusable template parts
- Use template parts across multiple templates
- Create variations of header/footer for different pages
Day 6-7: Block Markup & Weekend Project¶
๐ Day 6 Morning Reading:
๐งฑ Essential Structural Blocks:
- Site Blocks: Site Title, Site Logo, Site Tagline
- Navigation: Navigation Block
- Query Blocks: Query Loop, Post Template
- Post Blocks: Post Title, Post Content, Post Featured Image, Post Date, Post Author
- Layout Blocks: Group, Row, Stack, Columns
- Design Blocks: Cover, Spacer, Separator
โ๏ธ Practice:
- Build complex layouts using only core blocks
- Understand block attributes and customization
- Practice nesting blocks for complex structures
Day 6-7: Weekend Project
Project: Create a "Portfolio Block Theme"
Requirements:
- โ Complete template hierarchy:
- index.html
- home.html
- single.html
- page.html
- archive.html
- search.html
- 404.html
- โ Reusable template parts:
- Header with navigation
- Footer with social links
- Post meta
- โ Archive template with Query Loop for posts
- โ Single post template with post meta template part
- โ Custom page template for portfolio showcase
- โ All templates using proper block markup
- โ Proper theme.json configuration
Deliverable: A complete portfolio theme with full template hierarchy.
Week 3: Block Patterns & Style Variations¶
Goal: Create reusable block patterns and multiple style variations
Day 1-2: Block Patterns¶
๐ Reading:
๐ Topics:
- What are block patterns
- Pattern categories and organization
- Creating patterns in PHP
- Pattern best practices
๐จ Common Pattern Types:
- Hero sections
- Feature sections
- Testimonials
- Call-to-action (CTA)
- Footer layouts
- Contact sections
- Pricing tables
- Team member grids
โ๏ธ Practice:
- Create 5+ block patterns covering different use cases
- Register custom pattern categories
- Test patterns in the Site Editor
- Create pattern variations
Day 3-4: Style Variations¶
๐ Reading:
๐ Style Variations Directory:
my-theme/
โโโ theme.json
โโโ styles/
โโโ light.json
โโโ dark.json
โโโ high-contrast.json
๐ Topics:
- Creating style variations
- Color scheme variations
- Typography variations
- Spacing variations
- Testing style variations
โ๏ธ Practice:
- Create 3 style variations:
- Light theme (default)
- Dark theme
- High-contrast theme
- Test switching between variations in Site Editor
Day 5: Custom Block Styles¶
๐ Reading:
๐ Topics:
- Creating custom block styles
- Registering block styles via functions.php
- Adding custom CSS for block variations
- Block style best practices
โ๏ธ Practice:
- Create custom styles for core blocks
- Register block styles programmatically
- Add custom CSS for block style variations
Day 6-7: Weekend Project¶
Project: Create a "Business Block Theme"
Requirements:
- โ 10+ Block Patterns:
- Header variations (3)
- Hero sections (2)
- Services section
- About section
- Team member grid
- Pricing table
- Testimonials
- Call-to-action
- Contact form layout
- Footer variations (2)
- โ 3 Style Variations:
- Light (default)
- Dark
- Professional (high-contrast)
- โ Custom Block Styles:
- Button variations
- Heading styles
- Group/Cover styles
- โ Pattern categories organized logically
- โ Complete pattern library documentation
Deliverable: A business theme with extensive pattern library and style options.
Week 4: Advanced theme.json & Customization¶
Goal: Master advanced theme.json features and per-block customization
Day 1-2: Advanced theme.json Features¶
๐ Reading:
- theme.json Schema
- Custom CSS Properties
- appearanceTools
- useRootPaddingAwareAlignments
- Fluid Typography
- Responsive Spacing
๐ Advanced Topics:
- Fluid typography system
- Responsive spacing scales
- Custom CSS properties in theme.json
- Root padding aware alignments
- Appearance tools
โ๏ธ Practice:
- Implement fluid typography with min/max values
- Create responsive spacing scales
- Use custom CSS properties
- Enable appearance tools globally
Day 3-4: Custom Block Settings Per Block¶
๐ Reading:
๐ Topics:
- Customizing individual blocks via theme.json
- Enabling/disabling features per block
- Block-specific color palettes
- Block-specific typography
- Block-specific spacing
๐ง Per-Block Customization:
{
"settings": {
"blocks": {
"core/heading": {
"color": { "palette": [...] },
"typography": { "fontSizes": [...] }
}
}
}
}
โ๏ธ Practice:
- Configure different settings for different blocks
- Disable specific features for certain blocks
- Create block-specific color palettes
Day 5: Functions.php in Block Themes¶
๐ Reading:
๐ Topics:
- Theme support declarations
- Enqueuing editor styles
- Custom fonts registration
- Block pattern categories
- Block styles registration
- Asset enqueuing
โ๏ธ Common Functions:
// Theme setup
add_action('after_setup_theme', 'theme_setup');
// Enqueue scripts and styles
add_action('wp_enqueue_scripts', 'theme_scripts');
// Register block patterns
register_block_pattern_category();
// Register block styles
register_block_style();
โ๏ธ Practice:
- Add essential functions.php configurations
- Register custom pattern categories
- Enqueue custom fonts
- Add editor styles
Day 6-7: Weekend Project¶
Project: Create a "Magazine Block Theme"
Requirements:
- โ Advanced theme.json:
- Fluid typography system
- Responsive spacing scales
- Custom CSS properties
- Appearance tools enabled
- useRootPaddingAwareAlignments
- โ Block-specific customizations:
- Heading-specific typography
- Button-specific colors
- Cover block settings
- โ Custom fonts:
- Google Fonts integration
- Web font loading optimization
- โ Editor styles:
- Editor stylesheet that matches frontend
- โ Custom pattern categories:
- Editorial patterns
- Featured content
- Ad spaces
- โ Optimized for readability and performance
Deliverable: A magazine theme with advanced theme.json configuration.
Week 5: Query Loop, Navigation & Dynamic Content¶
Goal: Master dynamic content display and navigation systems
Day 1-2: Query Loop Block Mastery¶
๐ Reading:
๐ Topics:
- Understanding the Query Loop block
- Custom query parameters
- Pagination patterns
- Multiple query loops on one page
- Filtering by taxonomy
- Filtering by custom fields
๐ Query Parameters:
- Post type
- Number of posts
- Order by
- Taxonomy queries
- Author queries
- Date queries
- Sticky posts
โ๏ธ Practice:
- Create complex archive layouts with Query Loop
- Build featured posts section
- Create category-specific query loops
- Implement pagination
- Display related posts
Day 3: Navigation Block & Menus¶
๐ Reading:
๐ Topics:
- Navigation block features
- Creating responsive navigation
- Building mega menus with patterns
- Footer menus
- Social navigation
- Mobile menu patterns
๐งญ Navigation Types:
- Primary navigation
- Footer navigation
- Social links
- Breadcrumbs
- Pagination
โ๏ธ Practice:
- Build responsive header with navigation
- Create mobile menu pattern
- Build mega menu with patterns
- Create footer menu with social links
Day 4-5: Dynamic Blocks & Custom Post Types¶
๐ Reading:
๐ Topics:
- Creating templates for custom post types
- Custom archive pages
- Custom taxonomies in block themes
- Query Loop with custom post types
- Single custom post type templates
โ๏ธ Implementation:
// Register custom post type
register_post_type('portfolio');
// Register custom taxonomy
register_taxonomy('project-type', 'portfolio');
๐ Template Files:
single-portfolio.htmlarchive-portfolio.htmltaxonomy-project-type.html
โ๏ธ Practice:
- Create templates and patterns for portfolio custom post type
- Build custom archive with Query Loop
- Create custom taxonomy templates
- Add custom fields display
Day 6-7: Weekend Project¶
Project: Create an "E-Commerce Block Theme"
Requirements:
- โ WooCommerce Support:
- theme.json with WooCommerce settings
- functions.php with WooCommerce declarations
- โ Product Templates:
- Product archive with Query Loop
- Single product template
- Product categories template
- โ Shopping Patterns:
- Shopping cart page pattern
- Checkout page patterns
- Account page patterns
- โ Multiple Navigation:
- Primary navigation with cart icon
- Footer navigation
- Mobile menu
- Product categories menu
- โ Responsive mega menu with product categories
- โ Full Query Loop implementation for products
Deliverable: A complete e-commerce theme with WooCommerce integration.
Week 6: Performance, Accessibility & Distribution¶
Goal: Optimize theme for performance, accessibility, and prepare for distribution
Day 1-2: Performance Optimization¶
๐ Reading:
๐ Topics:
- Optimizing theme.json
- Reducing CSS output
- Font loading strategies
- Image optimization
- Core Web Vitals optimization
- Lazy loading
- Caching strategies
โก Performance Checklist:
- โ Optimize CSS delivery
- โ Minimize JavaScript
- โ Optimize web fonts
- โ Implement lazy loading
- โ Optimize images
- โ Reduce HTTP requests
- โ Test Core Web Vitals
โ๏ธ Practice:
- Audit theme performance with Lighthouse
- Optimize font loading
- Reduce CSS output
- Test on slow connections
Day 3: Accessibility in Block Themes¶
๐ Reading:
๐ Topics:
- WCAG 2.1 AA compliance
- Keyboard navigation
- Screen reader compatibility
- Color contrast requirements
- Skip links and landmarks
- Focus management
- ARIA labels
โฟ Accessibility Checklist:
- โ Proper heading hierarchy
- โ Keyboard navigation
- โ Color contrast (4.5:1 minimum)
- โ Alt text for images
- โ ARIA labels where needed
- โ Skip to content link
- โ Focus indicators
- โ Screen reader testing
โ๏ธ Practice:
- Make theme fully accessibility-ready
- Test with screen readers
- Test keyboard navigation
- Check color contrast
- Validate HTML
Day 4: Internationalization & Localization¶
๐ Reading:
๐ Topics:
- Translating theme.json strings
- RTL (Right-to-Left) support
- Translation-ready patterns
- Text domains
- Translation functions
๐ i18n Implementation:
RTL Support:
โ๏ธ Practice:
- Make theme fully translation-ready
- Implement RTL support
- Test with different languages
- Create .pot file
Day 5: Theme Testing & Debugging¶
๐ Reading:
๐ Topics:
- Theme unit testing
- Testing across different content types
- Browser testing
- Responsive testing
- Debugging techniques
๐งช Testing Checklist:
- โ Theme Check plugin passes
- โ Theme Unit Test data displays correctly
- โ All templates work properly
- โ Responsive on all devices
- โ Cross-browser testing
- โ Performance testing
- โ Accessibility testing
- โ i18n/RTL testing
โ๏ธ Practice:
- Complete full theme testing checklist
- Fix any issues found
- Document known limitations
Day 6-7: Distribution & WordPress.org Submission¶
๐ Reading:
๐ Topics:
- Theme review guidelines
- Creating theme screenshots
- Writing theme documentation (readme.txt)
- Theme licensing (GPL)
- Versioning strategy
- Changelog maintenance
๐ฆ Submission Requirements:
- โ Valid theme.json
- โ Proper style.css header
- โ Screenshot (1200x900px)
- โ readme.txt file
- โ GPL-compatible license
- โ No errors or warnings
- โ Accessibility ready
- โ Passes Theme Check
- โ Translation ready
- โ Documentation included
๐ readme.txt Template:
=== Theme Name ===
Contributors: username
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
== Description ==
[Theme description]
== Installation ==
[Installation instructions]
== Changelog ==
= 1.0.0 =
* Initial release
โ๏ธ Practice:
- Prepare complete submission package
- Write comprehensive readme.txt
- Create screenshots
- Create demo content
- Document theme features
Final Project (Week 7 - Optional)¶
Goal: Create a complete, production-ready block theme
Create a complete, production-ready block theme that combines everything learned:
Project Option 1: Multi-Purpose Block Theme¶
Requirements:
- โ 20+ Block Patterns covering all use cases:
- Headers (3 variations)
- Heroes (3 variations)
- Services/Features (3 variations)
- About sections (2 variations)
- Team members (2 variations)
- Testimonials (2 variations)
- Pricing tables (2 variations)
- Call-to-action (2 variations)
- Contact forms (2 variations)
- Footers (3 variations)
- โ 5+ Style Variations:
- Default
- Dark
- Professional
- Creative
- Minimalist
- โ Complete Page Templates:
- Homepage
- About page
- Services page
- Portfolio page
- Contact page
- Blog page
- โ WooCommerce Compatibility
- โ Accessibility Ready (WCAG 2.1 AA)
- โ RTL Support
- โ Optimized for Core Web Vitals
- โ Full Documentation
Project Option 2: Creative Agency Block Theme¶
Requirements:
- โ Portfolio System:
- Custom post type for portfolio
- Portfolio templates
- Portfolio archive with filtering
- Single project template
- Case study layout
- โ Team & Services:
- Team member patterns
- Service showcase patterns
- Client logo patterns
- Testimonial patterns
- โ Dynamic Features:
- Project filtering by category
- Related projects
- Newsletter integration patterns
- Contact form patterns
- โ Visual Polish:
- Smooth CSS animations
- Hover effects
- Parallax sections
- Video backgrounds
- โ Performance Optimized
- โ Fully Accessible
Project Option 3: Blog & Content Creator Theme¶
Requirements:
- โ Multiple Blog Layouts:
- Standard blog layout
- Grid layout
- Featured posts section
- Magazine-style homepage
- โ Content Features:
- Author bio patterns
- Related posts patterns
- Table of contents block
- Reading time indicator
- Post series support
- โ Engagement:
- Social sharing patterns
- Newsletter subscription patterns
- Comment patterns
- Breadcrumb navigation
- โ Monetization:
- Ad space patterns
- Affiliate disclosure patterns
- Sponsored post layouts
- โ SEO Optimized
- โ Performance Optimized
- โ Accessibility Ready
Additional Resources¶
Official Documentation¶
- WordPress Theme Developer Handbook - Complete theme development guide
- Block Editor Handbook - Block editor documentation
- theme.json Reference - Complete theme.json schema
- Block Theme Documentation - Block theme specific docs
Block Theme Tools¶
- Create Block Theme Plugin - Essential tool for FSE development
- Theme Check Plugin - Validate theme code
- Query Monitor - Debug queries and performance
Block Theme Examples¶
- Twenty Twenty-Four - Latest default theme
- Twenty Twenty-Three - Previous default theme
- Block Theme Directory - Browse all block themes
Learning Resources¶
- Full Site Editing Course - Official FSE course
- Block Pattern Directory - Inspiration and examples
- WordPress TV - FSE Tutorials - Video tutorials
Design & Inspiration¶
- WordPress Pattern Directory - Pre-made patterns
- Block Theme Showcase - Theme gallery
- Openverse - Free CC-licensed images
Testing & Validation¶
- Theme Unit Test Data - Test data import
- Accessibility Checker - A11y validation
- Wave Accessibility Tool - Online accessibility checker
- Google Lighthouse - Performance testing
Appendix: Classic Themes (Legacy)¶
โ ๏ธ Note: Classic themes are legacy. Learn these only if you need to maintain existing classic themes.
Classic Theme Basics¶
๐ Essential Reading:
Classic Theme Features¶
๐ Additional Topics:
Resources¶
- Underscores (_s) - Classic theme starter
- Classic Theme Documentation - Full classic theme guide
Learning Path¶
Follow the structured study plan above and refer to the official WordPress Block Theme Documentation for detailed information, examples, and best practices.
Key Points¶
- Start with Block Themes - They represent the future of WordPress
- Practice Regularly - Build projects after each week
- Use Official Resources - WordPress documentation is comprehensive
- Join the Community - Learn WordPress Slack, Make WordPress
- Stay Updated - WordPress evolves rapidly with new features
Success Metrics¶
By completing this study plan, you should be able to:
- โ Create production-ready block themes from scratch
- โ Master theme.json configuration
- โ Build complex layouts with blocks
- โ Create reusable patterns and style variations
- โ Optimize themes for performance and accessibility
- โ Submit themes to WordPress.org
- โ Understand the modern WordPress ecosystem
๐ Ready to start? Begin with Week 1: Block Theme Fundamentals
Important: Block themes represent the future of WordPress theme development. Focus on mastering block themes first, then learn classic themes only if you need to maintain legacy projects.