2 Steps to Add Default Content in WordPress Post Editor – WordPress Tips

By | April 17, 2019

Somtimes, you want to add some default content when add a new post, here are some steps:

Step 1. Open your theme functions.php file

Step 2. Paste code below into functions.php and save

add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
    $content = "This is default content in post editor.";
    return $content;
}

Then you will find some default text appared in post editor when you add a new post.

Leave a Reply

Your email address will not be published. Required fields are marked *