Title: WP_Block_List::offsetUnset
Published: August 11, 2020
Last modified: May 20, 2026

---

# WP_Block_List::offsetUnset( int $offset )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_block_list/offsetunset/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/wp_block_list/offsetunset/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_block_list/offsetunset/?output_format=md#changelog)

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

Unset a block.

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

 `$offset`intrequired

Offset of block value to unset.

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

    ```php
    #[ReturnTypeWillChange]
    public function offsetUnset( $offset ) {
    	unset( $this->blocks[ $offset ] );
    }
    ```

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

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_block_list/offsetunset/?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%2Fclasses%2Fwp_block_list%2Foffsetunset%2F)
before being able to contribute a note or feedback.