Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.
- Name:
core/post-template - Category: theme
- API Version: 3
- Block Type: Hybrid (static save + server enhancements)
Block Relationships
Ancestor blocks:
– core/query
Attributes
Defined via the attributes property in block.json.
This block has no custom attributes.
Supports
Defined via the supports property in block.json.
anchor:truereusable:falsehtml:falsealign:"wide","full"layout:truecolor:typography:fontSize:truelineHeight:true
spacing:margin:truepadding:trueblockGap:{"__experimentalDefault":"1.25em"}
interactivity:clientNavigation:true
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
queryIdquerydisplayLayouttemplateSlugpreviewPostTypeenhancedPaginationpostTypepostId
Block Markup
This is a hybrid block. It saves static markup that the server may enhance during rendering.
<!-- wp:post-template /-->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.