Ollie Theme Academy

Creating Block Patterns

Using patterns for static assets – A

WordPress doesn’t provide native support for including theme-bundled static assets in the site editor. Block patterns provide the workaround by enabling PHP-based asset management within the visual editing environment.

Static assets like theme-specific images, icons, or media files need special handling since they should reference theme directory files rather than uploaded media. Standard image blocks expect database-stored media.

Start by creating the basic block structure in the editor with appropriate layout controls (like Group blocks for alignment options), then extract the markup for pattern creation.

This approach bridges the gap between the visual site editor and traditional theme development needs, enabling theme-bundled assets within the block-based architecture.

Back to: Ollie Theme Academy > Creating Block Patterns