# Change the Content and Wide Widths of a Block Theme

> Sets how wide normal and "wide" content is in your block theme, on the site and in the editor, for example a narrower reading column with wider images.

- Type: PHP
- Runs: Run everywhere
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: theme-json, layout, width
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/themejson-content-wide-widths/

## Code

```php
// Width of normal content and of wide-aligned blocks.
$wpide_content_size = '720px';
$wpide_wide_size    = '1200px';

add_filter( 'wp_theme_json_data_theme', function ( $theme_json ) use ( $wpide_content_size, $wpide_wide_size ) {
    return $theme_json->update_with( array(
        'version'  => WP_Theme_JSON::LATEST_SCHEMA,
        'settings' => array(
            'layout' => array(
                'contentSize' => $wpide_content_size,
                'wideSize'    => $wpide_wide_size,
            ),
        ),
    ) );
} );
```

## Notes

Values can be px, rem or %. Changes made in the Site Editor's Styles still take priority.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Change the Content and Wide Widths of a Block Theme" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
