Powered By Blogger

Tuesday, January 8, 2019

Add default text in content when click add new post

// Add default content in Post Editor.
add_filter('default_content', 'my_editor_content', 10, 2);

function my_editor_content($content, $post) {
if($post->post_type == 'post') {
$content = "<br><br>";
                $content .= "<p>Test</p>";
            return $content;
}
}

No comments:

Post a Comment