# "Page Without Title" Template for Block Themes

> Registers a page template that keeps the theme's header and footer but hides the page title, for pages that start with their own hero section (WordPress 6.7+).

- Type: PHP
- Runs: Run everywhere
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: templates, pages, block-themes
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/register-page-no-title-template/

## Code

```php
add_action( 'init', function () {
    if ( ! function_exists( 'register_block_template' ) || ! wp_is_block_theme() ) {
        return;
    }

    register_block_template( 'wpide//page-no-title', array(
        'title'       => 'Page without title',
        'description' => 'Header, page content and footer, with no title.',
        'post_types'  => array( 'page' ),
        'content'     => '<!-- wp:template-part {"slug":"header","tagName":"header"} /--><!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} --><main class="wp-block-group"><!-- wp:post-content {"layout":{"type":"constrained"}} /--></main><!-- /wp:group --><!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->',
    ) );
} );
```

## Notes

Pick it under Template in the page sidebar. It uses your theme's "header" and "footer" template parts.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Page Without Title" Template for Block Themes" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
