Core Function
View Source on Trac ↗ _wp_build_title_and_description_for_single_post_type_block_template()
_wp_build_title_and_description_for_single_post_type_block_template( mixed $post_type, mixed $slug, WP_Block_Template $template ) Builds the title and description of a post-specific template based on the underlying referenced post.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $post_type string | Post type, e.g. page, post, product. Required |
| $slug string | Slug of the post, e.g. a-story-about-shoes. Required |
| $template WP_Block_Template | Template to mutate adding the description and title computed. Required |
Return Value
(bool)
Returns true if the referenced post was found and false otherwise.
Function Information
Since Version
6.1.0
Source File
wp-includes/block-template-utils.php
Advertisement