Family Encyclopedia >> Electronics

How to set the HTML editor as the default post editor in WordPress

In our previous articles, we showed a way for users to remove the visual editor mode from the WordPress post panel. The downside of that hack 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 the HTML Editor as the default editor for all users on your WordPress site.

By default, the Visual Editor is the default post editor for WordPress, so you don't need to add any code. You are good to go from the start. But if you want the HTML editor to be the default post editor in WordPress, 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 bother your users with the VisualEditor. If you want to customize more options for different user roles, we recommend checking out the WordPress admin plugin.

Source:WP Snippets