# Starter Text for New Posts

> Fills the editor of every new post with your own starter text or outline, so writers begin from the same structure each time.

- Type: PHP
- Runs: Admin only
- Category: [Content](https://wpide.com/library/category/content/)
- Tags: editor, template, posts
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/default-content-for-new-posts/

## Code

```php
// Post type that gets the starter text.
$wpide_starter_post_type = 'post';
// Starter content (HTML or block markup).
$wpide_starter_content = '<!-- wp:paragraph --><p>Introduction: what will the reader learn?</p><!-- /wp:paragraph -->

<!-- wp:heading --><h2 class="wp-block-heading">Main point</h2><!-- /wp:heading -->

<!-- wp:paragraph --><p>Explain the main idea here.</p><!-- /wp:paragraph -->

<!-- wp:heading --><h2 class="wp-block-heading">Summary</h2><!-- /wp:heading -->';

add_filter( 'default_content', function ( $content, $post ) use ( $wpide_starter_post_type, $wpide_starter_content ) {
    if ( '' !== $content || ! $post || $wpide_starter_post_type !== $post->post_type ) {
        return $content;
    }

    return $wpide_starter_content;
}, 10, 2 );
```

## Notes

Change the post type or the starter HTML. Existing posts are not affected.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Starter Text for New Posts" 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/
