Title: unregistered_post_type
Published: April 12, 2016
Last modified: May 20, 2026

---

# do_action( ‘unregistered_post_type’, string $post_type )

## In this article

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

[ Back to top](https://developer.wordpress.org/reference/hooks/unregistered_post_type/?output_format=md#wp--skip-link--target)

Fires after a post type was unregistered.

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

 `$post_type`string

Post type key.

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

    ```php
    do_action( 'unregistered_post_type', $post_type );
    ```

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

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

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

Unregisters a post type.

  |

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

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

## User Contributed Notes

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