Disable WYSIWYG Editor for WordPress Custom Post Types

Quick n’ handy snippet to disable the Visual editor or WYSIWYG editor for WordPress Custom Post Types.

There may arise a need when developers want to hide the Visual editor aka WYSIWYG Editor from their Post types.

If such is the case, you should just implement the following code in the functions.php file of your theme OR in the plugin files if you have a plugin installed to set up CPTs:

add_filter('user_can_richedit', 'disable_wysiwyg_for_CPT');
function disable_wyswyg_for_CPT($default) {
  global $post;
  if ('movie' == get_post_type($post))
    return false;
  return $default;