Title: unregister_block_pattern
Published: August 11, 2020
Last modified: August 20, 2026

---

# unregister_block_pattern( string $pattern_name ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#user-contributed-notes)

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

Unregisters a block pattern.

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

 `$pattern_name`stringrequired

Block pattern name including namespace.

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

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

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

    ```php
    function unregister_block_pattern( $pattern_name ) {
    	return WP_Block_Patterns_Registry::get_instance()->unregister( $pattern_name );
    }
    ```

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

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

| Uses | Description | 
| [WP_Block_Patterns_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_block_patterns_registry/get_instance/)`wp-includes/class-wp-block-patterns-registry.php` |

Utility method to retrieve the main instance of the class.

  |

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

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

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/unregister_block_pattern/?output_format=md#comment-content-6414)
 2.   [Manish Songirkar](https://profiles.wordpress.org/manishsongirkar36/)  [  4 years ago  ](https://developer.wordpress.org/reference/functions/unregister_block_pattern/#comment-6414)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_pattern%2F%23comment-6414)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_pattern%2F%23comment-6414)
 4. Example code to remove pattern,
 5.     ```php
        unregister_block_pattern( 'wpdocs-plugin/wpdocs-columns-list' );
        ```
    
 6. Example code to remove specific patterns registered in core,
 7.     ```php
        add_action( 'init', 'wpdocs_remove_core_patterns' );
    
        function wpdocs_remove_core_patterns() {
        	$core_block_patterns = array(
        		'query-standard-posts',
        		'query-medium-posts',
        		'query-small-posts',
        		'query-grid-posts',
        		'query-large-title-posts',
        		'query-offset-posts',
        		'social-links-shared-background-color',
        	);
    
        	foreach ( $core_block_patterns as $core_block_pattern ) {
        		unregister_block_pattern( 'core/' . $core_block_pattern );
        	}
        }
        ```
    
 8.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Funregister_block_pattern%2F%3Freplytocom%3D6414%23feedback-editor-6414)

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