{"id":54383,"date":"2017-08-28T15:33:19","date_gmt":"2017-08-28T18:33:19","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=54383"},"modified":"2019-03-18T14:29:21","modified_gmt":"2019-03-18T13:29:21","slug":"how-to-add-default-content-in-post-editor","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/how-to-add-default-content-in-post-editor\/","title":{"rendered":"How to add default content in post editor"},"content":{"rendered":"<p><!--more--><\/p>\n<p>Add the following code to your theme&#8217;s <em>functions.php<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\">add_filter( 'default_content', 'my_editor_content' );\nfunction my_editor_content( $content ) {\n    $content = \"REPLACE THIX TEXT\";\n    return $content;\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>Source:\u00a0<a target=\"_blank\" href=\"http:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-add-default-content-in-your-wordpress-post-editor\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-add-default-content-in-your-wordpress-post-editor\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Add the following code to your theme's functions.php: add_filter( 'default_content', 'my_editor_content' ); function my_editor_content( $content ) { $content = \"REPLACE [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9],"tags":[76,80,223,224],"class_list":["post-54383","post","type-post","status-publish","format-standard","hentry","category-php-tricks","category-wordpress","tag-dashboard","tag-default-content","tag-post-editor","tag-posts"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=54383"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54383\/revisions"}],"predecessor-version":[{"id":54872,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54383\/revisions\/54872"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=54383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=54383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=54383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}