a
anipage.io
Inizia gratis
Glossary

Template Part — Parti di template riutilizzabili di WordPress spiegate

Le parti di template sono componenti riutilizzabili nei temi a blocchi di WordPress. Scopri come funzionano e in cosa differiscono dai template PHP classici.

Definition

A template part is a saved block snippet in a WordPress block theme that can be used across multiple templates. The most common use case: header and footer as template parts appearing on all pages. Since Full Site Editing (WordPress 5.9), template parts can be edited directly in the editor — no PHP knowledge required.

Template parts vs. classic PHP templates

In classic WordPress themes, the header is defined in `header.php` and the footer in `footer.php` — editable only by code. In block themes, header and footer are template parts: visually editable in the Full Site Editor, stored as HTML files with Gutenberg block markup in the `/parts/` folder.

Creating and editing template parts

In the Full Site Editor (Appearance → Editor), existing template parts can be edited or new ones created. New parts are saved as HTML files in the theme. Template parts are included in templates via `<!-- wp:template-part {"slug":"header"} /-->`.

Template parts and anipage.io

anipage.io generates complete page content as Gutenberg block markup — including header- and footer-like sections. The export contains the page content (without theme template parts), which can be imported into existing WordPress themes without overwriting existing template parts.

Frequently Asked Questions

What is a template part in WordPress?
A template part is a reusable block snippet (e.g. header or footer) edited in block themes via the Full Site Editor, used across multiple page templates.
Can I edit template parts without coding?
Yes. In the Full Site Editor (WordPress 5.9+), template parts can be edited visually — no PHP or coding knowledge required.
Do I need a block theme for template parts?
Yes. Template parts are a feature of block themes. Classic themes use PHP template files instead of WordPress blocks.

Pronto a creare pagine WordPress in minuti?

Inizia gratis con 3 generazioni al mese. Nessuna carta di credito. Nessun impegno. Cancella in qualsiasi momento.

Inizia gratis ora

Related Terms

Related Articles