• Posted: 2010-10-15
  • Author: Victor Meyer
  • Tags:

Set default editor

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
<?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";') );  
?>

Instructions:

This snippet changes the default editor in WordPress admin. Either you go with the Visual Editor, or you can choose the HTML Editor. Add this to functions.php.

If your goal is to disable one of the Editors, which could be the case if you are working with a client, you can achieve this either through CSS or JavaScript. WP-engineer explains how to do it!


Related links:
http://wpengineer.com/1946/disable-html-editor-wordpress/
Share this snippet

If you like this snippet, share it with friends!