Title: unregister_block_pattern_category
Published: August 11, 2020
Last modified: April 28, 2025

---

# unregister_block_pattern_category( string $category_name ): bool

## In this article

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

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

Unregisters a pattern category.

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

 `$category_name`stringrequired

Pattern category name including namespace.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/unregister_block_pattern_category/?output_format=md#return)󠁿

 bool True if the pattern category was unregistered with success and false otherwise.

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

    ```php
    function unregister_block_pattern_category( $category_name ) {
    	return WP_Block_Pattern_Categories_Registry::get_instance()->unregister( $category_name );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-block-pattern-categories-registry.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-block-pattern-categories-registry.php#L189)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-block-pattern-categories-registry.php#L189-L191)

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

| Uses | Description | 
| [WP_Block_Pattern_Categories_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_block_pattern_categories_registry/get_instance/)`wp-includes/class-wp-block-pattern-categories-registry.php` |

Utility method to retrieve the main instance of the class.

  |

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

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

## User Contributed Notes

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