Title: _disable_content_editor_for_navigation_post_type
Published: February 3, 2022
Last modified: August 20, 2026

---

# _disable_content_editor_for_navigation_post_type( WP_Post $post )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#changelog)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

This callback disables the content editor for wp_navigation type posts.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#description)󠁿

Content editor cannot handle wp_navigation type posts correctly.
We cannot disable
the “editor” feature in the wp_navigation’s CPT definition because it disables the
ability to save navigation blocks via REST API.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#parameters)󠁿

 `$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)required

An instance of [WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
class.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#source)󠁿

    ```php
    function _disable_content_editor_for_navigation_post_type( $post ) {
    	$post_type = get_post_type( $post );
    	if ( 'wp_navigation' !== $post_type ) {
    		return;
    	}

    	remove_post_type_support( $post_type, 'editor' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/post.php#L2633)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/post.php#L2633-L2640)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#related)󠁿

| Uses | Description | 
| [remove_post_type_support()](https://developer.wordpress.org/reference/functions/remove_post_type_support/)`wp-includes/post.php` |

Removes support for a feature from a post type.

  | 
| [get_post_type()](https://developer.wordpress.org/reference/functions/get_post_type/)`wp-includes/post.php` |

Retrieves the post type of the current post or of a given post.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_disable_content_editor_for_navigation_post_type/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_disable_content_editor_for_navigation_post_type%2F)
before being able to contribute a note or feedback.