{"id":41022,"date":"2010-10-16T10:08:14","date_gmt":"2010-10-16T14:08:14","guid":{"rendered":"http:\/\/wpmu.org\/?p=41022"},"modified":"2012-10-17T18:19:44","modified_gmt":"2012-10-17T22:19:44","slug":"daily-tip-how-to-set-the-default-editor-to-visual-or-html-in-wordpress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/daily-tip-how-to-set-the-default-editor-to-visual-or-html-in-wordpress\/","title":{"rendered":"How to Set the Default Editor to Visual or HTML in WordPress"},"content":{"rendered":"<p>Did you know that you can set the default editor in the WordPress post editor screen?<\/p>\n<p>Select which one you want to be the default and simply add this to your theme&#8217;s <i>functions.php<\/i> file:<\/p>\n<p><b>For Visual set as default:<\/b><\/p>\n<p><code>add_filter( 'wp_default_editor', create_function('', 'return \"tinymce\";') );<\/code><\/p>\n<p><b>For HTML set as default:<\/b><\/p>\n<p><code>add_filter( 'wp_default_editor', create_function('', 'return \"html\";') );<\/code><\/p>\n<div style=\"clear: both; width: 640px;\"><\/div>\n<p><a rel=\"lightbox[41022]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2010\/10\/editor.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41034\" title=\"editor\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2010\/10\/editor.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"579\" height=\"324\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know that you can set the default editor in the WordPress post editor screen? Select which one you want to be the default and simply add this to your theme&#8217;s functions.php file: For Visual set as default: add_filter( &#8216;wp_default_editor&#8217;, create_function(&#8221;, &#8216;return &#8220;tinymce&#8221;;&#8217;) ); For HTML set as default: add_filter( &#8216;wp_default_editor&#8217;, create_function(&#8221;, &#8216;return &#8220;html&#8221;;&#8217;) [&hellip;]<\/p>\n","protected":false},"author":4099,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[1,557,1117,263],"tags":[200,2186],"tutorials_categories":[],"class_list":["post-41022","post","type-post","status-publish","format-standard","hentry","category-news-community","category-development","category-multisite","category-tutorials","tag-html","tag-wordpress-editor"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/41022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/4099"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=41022"}],"version-history":[{"count":1,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/41022\/revisions"}],"predecessor-version":[{"id":183366,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/41022\/revisions\/183366"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=41022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=41022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=41022"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=41022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}