A bit involved, but this should work:
function remove_wysiwyg() {
global $pagenow;
if ( 'post.php' == $pagenow ) {
$type = get_post_type( $_GET['post'] );
if( 'post' != $type || 'page' != $type )
add_filter('user_can_richedit', '__return_false');
} elseif ( 'post-new.php' == $pagenow ) {
if( isset( $_GET['post_type'] ) && 'page' != $_GET['post_type'] )
add_filter('user_can_richedit', '__return_false');
}
}
add_action( 'admin_init', 'remove_wysiwyg' );
Related Posts:
- Make WordPress WYSIWYG not strip out iframe’s
- How do you add custom color swatches to all WYSIWYG editors?
- The correct way of adding TinyMCE editor to custom meta box textarea?
- Highlight Syntax Inline
- Adding a button to the WYSIWYG editor?
- What are the better WYSIWYG post editor replacement alternatives?
- WYSIWYG WordPress readme.txt file Markdown Viewer
- Dynamically textarea with TinyMce editor
- Having a lot of difficulty getting add_editor_style() to load into source code
- Remove text tab
- Keyboard Shortcut to Publish Post on the Mac
- strong tag not working in WordPress 4.0.1
- Multiple WYSIWYG editors with settings teeny => true
- Why doesn’t the WYSIWYG support H1-H6 tags?
- When creating a blog post through the WYSIWYG editor, text is not being wrapped in tags correctly when starting with a link
- How to manage heading font options located in the wysiwyg editor for posts and pages
- How do you keep the default WYSIWYG active when using a custom template?
- Any Wysiwyg tool to edit wordpress site based on given theme?
- Stop WordPress Wrapping Images In A “P” Tag
- Is there a way to get N number of WYSIWYG editors in a custom post type?
- Is it possible to remove WYSIWYG for a certain Custom Post Type?
- How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?
- Adding content to archive and taxonomy pages on custom post types?
- Simple rich text editor in Text widget?
- How can I improve the line break handling in the WYSIWYG editor?
- Modify links when inserted by WYSIWYG editor
- Replace Taxomony Description Field with Visual/WYSIWYG Editor
- Is it possible to create nested lists in the WYSIWYG editor?
- Cite-Tag for blockquotes
- Drag-and-drop “Panels”-style visual layout editor?
- How can I filter Microsoft Word gunk from pasted content?
- How to remove commenters ability to add hyperlinks to comments?
- Resizing the width of the WYSIWYG editor
- Snippet: Use classes instead of inline styles for text alignment
- Pasting images removes class attribute
- data-accordion removed in Visual Editor
- Theme Advanced Styles in Visual Editor and Paragraphs
- How to remove_filter that filters iframes in posts? [duplicate]
- two tinyMCE editors in the same page
- View content from uploaded file in editor
- Remove_filter (‘the_content’, ‘wpautop’) is not working
- Qtranslate + Advanced Custom Fields: how to have a multilanguage wysiwyg editor? [closed]
- Ability to edit image via WYSIWYG
- TinyMCE strips line breaks on mceAddControl
- Hide WYSIWYG editor on certain templates
- How do I add a listbox to the TinyMCE editor?
- Wysiwyg editor for P2 theme
- Dynamically adding WYSIWYG to metaboxes
- Keep WYSIWYG on Blog Page
- Adding multiple WYSIWYG editors to custom post type
- Add TinyMCE to CPT metaboxes in 3.1?
- When adding buttons to the tinyMCE editor, how do I make them wrap to the next line and/or display in the “Kitchen Sink” area?
- How to allow html5 tag in WordPress
- Set post title based on first h2 element in the content section
- Custom settings page TinyMce: no formatting when echoing value of editor
- Is there a filter for editor-style.css file?
- Can Rich Text features be configured per user?
- Is Using WordPress Supplied WYSIWYG Advisable?
- Stop WordPress Visual Editor converting backticks into code blocks
- Problem with using custom shortcode with ACF WYSIWYG field
- Creating table layout in WYSIWYG editor
- Add default text to multiple wysiwyg editors
- Prevent WordPress from messing my HTML
- How to remove p tags around img and iframe tags in the acf wysiwyg field
- WYSIWYG eating up first p in td
- Remove headings option from Wysiwyg editor from ACF in a certain custom post type
- How to Add TinyMCE to widget
- Add a select option of shortcodes like dropdown in tinymce
- How to dynamically generate wordpress editor on frontend?
- How to add wp visual editor in a custom widget?
- Unable to add TAB character to post?
- Inserting code to HTML view from a pop up initiated from visual view
- wysiwyg is scrambled
- Tiny MCE doesn’t look anything like my blog
- remove initial wysiwyg editor from cms page edit
- Advanced Custom Fields functionality without plugin
- How to add custom tinymce plugin to new text widget
- Stop editor from adding “amp;” after every “&”
- TinyMCE not loading in IE8
- How to add custom page elements to the WYSIWYG editor?
- How to paste into WordPress editor without changing existing formatting in editor?
- Dynamic WordPress editor in meta box
- Tiny MCE custom styles, and preview in the backend
- TinyMCE’s “Clear Formatting” button doesn’t remove lists and headings
- Uncaught TypeError: switchEditors.switchto is not a function
- Images are broken in Wysiwyg Editor – ACF backend
- Adding custom classes to elements via the WYSIWYG
- More HTML elements variety in visual editor
- Creating custom setting in add media popup
- Wp Some Pages content Not display in editor after move live server
- WordPress adding extra html coding to my data on saving
- Is it possible to call a template file inside wysiwyg editor? And how?
- WordPress page editor for clients, opinions needed
- How do I embed an image at actual size?
- WYSIWYG editor not in a post editor?
- Disable media upload in rich text editor
- Add custom classes to TinyMCE generated markup
- Problem with Line spacing in wysiwyg editor in WP 3.5.1
- How to output cmb2 wysiwyg by using timber
- How to enable on custom shortcodes