Skip to main content
added 84 characters in body
Source Link
souporserious
  • 679
  • 1
  • 11
  • 27

Trying to remove the WYSIWYG Editor on all post types except the default pages and posts.

This is what I have so far that doesn'tShouldn't this work

// Remove WYSIWYG Editor
if(function get_post_typeremove_wysiwyg( $hook ) {
    if ( $hook != 'post''post-new.php' )|| {$hook != 'post.php' )
    add_filter('user_can_richedit', '__return_false');
}
add_action( 'init', 'remove_wysiwyg' );

Trying to remove the WYSIWYG Editor on all post types except the default pages and posts.

This is what I have so far that doesn't work

// Remove WYSIWYG Editor
if( get_post_type() != 'post' ) {
    add_filter('user_can_richedit', '__return_false');
}

Trying to remove the WYSIWYG Editor on all post types except the default pages and posts.

Shouldn't this work

// Remove WYSIWYG Editor
function remove_wysiwyg( $hook ) {
    if ( $hook != 'post-new.php' || $hook != 'post.php' )
    add_filter('user_can_richedit', '__return_false');
}
add_action( 'init', 'remove_wysiwyg' );
Source Link
souporserious
  • 679
  • 1
  • 11
  • 27

Remove WYSIWYG editor on all custom post type EXCEPT regular posts

Trying to remove the WYSIWYG Editor on all post types except the default pages and posts.

This is what I have so far that doesn't work

// Remove WYSIWYG Editor
if( get_post_type() != 'post' ) {
    add_filter('user_can_richedit', '__return_false');
}