Ollie Theme Academy

Creating Template Parts

Template parts and template part areas

Template parts work through a registration system that connects template part files to functional areas. Header and footer blocks are actually template part blocks with special visual treatment and icons.

The registration happens in theme.json’s templateParts section, linking files to areas like “header,” “footer,” or custom areas you define. This enables template part variations where users can choose between multiple designs for the same area.

Areas organize template parts functionally rather than just visually. You could create custom areas for specific purposes and register multiple template parts to each area, giving users design choices within functional contexts.

Template parts synchronize changes like templates do – modify a template part file and see immediate changes on the frontend. This makes them powerful for building modular, maintainable theme designs.

Back to: Ollie Theme Academy > Creating Template Parts