Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Set HTML Editor as the Default Post Editor in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Set HTML Editor as the Default Post Editor in WordPress

In our earlier articles, we showed a way for users to remove the visual editor mode from the WordPress post panel. The downside of that trick is that it requires editing each user profile and setting a preference. In this article, we will share with you a way that you can set HTML Editor as the default editor for all users in your WordPress site.

By default, Visual Editor is the default post editor for WordPress, so there is no need for you to add any codes. You are good to go from the start. But if you want to make the HTML editor as the default post editor in WordPress, then open your theme’s functions.php file and paste the following code:

add_filter( 'wp_default_editor', create_function('', 'return "html";') );

Now, you don’t have to heckle your users with the Visual Editor. If you want to customize more options for different user roles, then we recommend you check out the WordPress Adminize Plugin.

Source: WP Snippets


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. somesh says:

    my Visual editor mode is not default i want to make it default how to do that

  2. Piet says:

    doesn’t work for me, i can still toggle on and off the visual editor

  3. Nayan says:

    Nice Posts, Thanks WPBeginner :)

  4. Frank says:

    a hint: the name of the plugin is Adminimize and the source of this code-snippet is from WPEngineer.com

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.