I believe the helper you’re looking for (assuming we’re not dealing with a custom post type) is:
<?php remove_post_type_support('page', 'editor'); ?>
When dealing with a custom post type you can exclude ‘editor’ from the ‘supports’ parameter to initialize the post type without the editor window.
Finally, if you are trying to disable the editor only when a specific page template is selected from the “Template” drop down menu, your best bet is likely a Javascript/jQuery approach to HIDE “#postdivrich” after an onChange event is triggered by “#page_template”. Just remember to SHOW when the other templates that do support the editor are selected.
Related Posts:
- How do I add Bootstrap and LESS to my migrated WordPress site?
- remove empty paragraphs from the_content?
- Issues with title-tag and document_title_parts
- Remove Actions/Filters added via Anonymous Functions
- How to load scripts/styles specific for a page
- Set JPEG compression for specific custom image sizes
- Define custom Page Template without its own .php file
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- functions.php inject inline css
- Removing default image size list in Media Box
- How to restrict actions and filters “properly” by conditions
- Filter the query ONLY for the search results page
- How do I create a new WP admin color scheme?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Using add_filter() in Widgets
- Logout/login redirect CSS issue
- Customize WordPress Media Manager – Media Window
- How to reduce original image quality on upload?
- Is it possible to use a forgot password url filter?
- syntax for remove_filter in parent theme with class
- Add body class of category parent
- Add attribute to link tag that’s generated through wp_register_style?
- TinyMCE custom stylesheets for different post types
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Convert hyphen to underscore in permalinks
- Override parent theme function that is not hooked or in the functions.php file
- Remove Page Title from Static Frontpage
- Programmatically Add Font-Awesome Icons to Category Widget
- Remove bulk actions based on user role or capabilities
- Default or Preset Content for Custom Post Types
- Remove “says” from comments
- How to add CSS style sheet dynamically in wordpress
- Override a class function to include a custom template
- Simple/basic use of get_current_screen
- How to override filter in child theme?
- Removing title from page
- Is it possible to be more page/post specific with admin_enqueue_script?
- Hide some items from Screen options in dashboard for products
- How to change a certain text or term of WordPress into a custom into the whole site?
- Child Theme Not Overriding Parent Theme
- Adding body class when post contains a specific shortcode
- CSS stylesheet not loading
- Theme options WP Editor
- Enqueue styles after a plugin
- Replace Archive Widget Link Text
- Exclude Empty Child Categories in Menu
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- Best way to programatically add “rel” attributes to page and post images
- How can I stop a function from encoding an entity?
- add_filter priority problem
- Limit filter upgrader_post_install to a single plugin
- How to add background image control to page admin controls?
- How to update feed only 2-3 times a week (for Feedburner email)?
- Manipulate Output of wp_list_something: select menu instead of li’s
- Clean-up script tags
- How to use IF Statement in WordPress?
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- Show excerpt for only first post in query
- Remove function or filter
- modify a function filter
- Super simple shortcode not working
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Add class or ID to any WordPress function
- How to filter out shortcode when displaying the_excerpt() in the loop?
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- Register and enqueue style.css custom theme
- Multiple CSS body classes to specific page I.D.’s – is this possible?
- Which action hook to use for function?
- Adding multiple taxonomy filters to functions.php
- str_replace function in theme
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Adding HTML to the end of every post with the Block Editor
- Last updated date function
- Enqueue Style Only On Certain Pages Not Working
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- Modify a function without editing template
- How to set default archive image without overriding first attached image? [closed]
- Child Theme files – what is needed?
- How to add nav menu items to a specific position within a menu
- Passing values from a widget to a function within a plugin
- Only let plugin add actions to wp_head & wp_footer on single posts
- How to Display Frontend CSS for Administrator only
- Publish/Update post is changing image links from file url to post url
- Disable auto-resizing of uploaded images, but only for certain filename
- How to make custom column Admin>Users sortable?
- WordPress Menuing Question :focus
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Get Current Post ID in functions php, meta query filter
- Output and filter data from a XML url
- Add to cart php not working [closed]
- Is possible add icon in title posts only in specific tag?
- change the url paths in the stylesheet dynamically
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- create filter in functions.php
- How to filter $content in shortcode function