Set WordPress Default Text Editor
When using the WordPress text editor you can choose if you want to write your posts in either the visual text editor or the HTML text editor.
By default this will be set to visual, but I prefer to use the HTML editor as then I know exactly what is going into the post.
Adding the following WordPress snippet means you can make sure the WordPress will always use the html as the default text editor.
Add this to the functions.php page and remove the line depending on which you want as the default editor.
<?php # This sets the Visual Editor as default # add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') ); # This sets the HTML Editor as default # add_filter( 'wp_default_editor', create_function('', 'return "html";') ); ?>
Learn how to code with Treehouse
- Learn projects with access to 1000+ videos
- Practice live with our Code Challenge Engine
- Get help in our members-only forums
Join the weekly newsletter
Sign up for our newsletter. You'll be updated on new tutorials as they come available.
Subscribe today and get a 50% discount code to Paulund