1 min read

1. Add customTemplates to theme.json

"customTemplates": [
        {
            "name": "page-no-title", // < has to be page-
            "title": "Page (No Title)",
            "postTypes": ["page"]
        }
    ]

2. Add the file to \templates\

templates\page-no-title.html has to be page-

<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","className":"py-12","layout":{"type":"constrained"}} -->
<main class="wp-block-group py-12">
    <!-- wp:post-content {"layout":{"type":"constrained"}} /-->
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

3. Change Template in Edit Page