WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering, is it possible to set default text to appear inside "text" part of the wysiwyg located on Create post page? So every time you click add new post that text would be there waiting for you?

share|improve this question
up vote 5 down vote accepted

There is a filter named default_content. It does exactly what the name says. :)


add_filter( 'default_content', 't5_preset_editor_content', 10, 2 );

 * Fills the default content for post type 'post' if it is not empty.
 * @param string $content
 * @param object $post
 * @return string
function t5_preset_editor_content( $content, $post )
    if ( '' !== $content or 'post' !== $post->post_type )
        return $content;

    return 'This is the <em>default</em> content. You may customize it.';

As you can see, the post type is already available, so you could set different defaults for different post types.

Related filters are default_title and default_excerpt. They work the same way.

You can also send someone a link with parameters for content, post_title and excerpt:



enter image description here

share|improve this answer
I type too slowly, apparently. Exactly the answer I was going to give. – Pat J Apr 29 '13 at 20:40
@PatJ I didn’t type that much. – toscho Apr 29 '13 at 20:41
toscho has beaten me before too @PatJ :) – Andrew Bartel Apr 29 '13 at 21:43
@toscho goes into functions.php correct? – Ilya Knaup Apr 29 '13 at 23:47
@IlyaKnaup Please, no. :) Make a plugin for that, something like this one. – toscho Apr 30 '13 at 8:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.