Title: WP_Screen::render_screen_layout
Published: April 25, 2014
Last modified: February 24, 2026

---

# WP_Screen::render_screen_layout()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/WP_Screen/render_screen_layout/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/WP_Screen/render_screen_layout/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/WP_Screen/render_screen_layout/?output_format=md#changelog)

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

Renders the option for number of columns on the page.

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

    ```php
    public function render_screen_layout() {
    	if ( ! $this->get_option( 'layout_columns' ) ) {
    		return;
    	}

    	$screen_layout_columns = $this->get_columns();
    	$num                   = $this->get_option( 'layout_columns', 'max' );

    	?>
    	<fieldset class='columns-prefs'>
    	<legend class="screen-layout"><?php _e( 'Layout' ); ?></legend>
    	<?php for ( $i = 1; $i <= $num; ++$i ) : ?>
    		<label class="columns-prefs-<?php echo $i; ?>">
    		<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>' <?php checked( $screen_layout_columns, $i ); ?> />
    		<?php
    			printf(
    				/* translators: %s: Number of columns on the page. */
    				_n( '%s column', '%s columns', $i ),
    				number_format_i18n( $i )
    			);
    		?>
    		</label>
    	<?php endfor; ?>
    	</fieldset>
    	<?php
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-screen.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-wp-screen.php#L1201)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-screen.php#L1201-L1226)

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

| Uses | Description | 
| [WP_Screen::get_option()](https://developer.wordpress.org/reference/classes/wp_screen/get_option/)`wp-admin/includes/class-wp-screen.php` |

Gets the arguments for an option for the screen.

  | 
| [WP_Screen::get_columns()](https://developer.wordpress.org/reference/classes/wp_screen/get_columns/)`wp-admin/includes/class-wp-screen.php` |

Gets the number of layout columns the user has selected.

  | 
| [_n()](https://developer.wordpress.org/reference/functions/_n/)`wp-includes/l10n.php` |

Translates and retrieves the singular or plural form based on the supplied number.

  | 
| [checked()](https://developer.wordpress.org/reference/functions/checked/)`wp-includes/general-template.php` |

Outputs the HTML checked attribute.

  | 
| [_e()](https://developer.wordpress.org/reference/functions/_e/)`wp-includes/l10n.php` |

Displays translated text.

  | 
| [esc_attr()](https://developer.wordpress.org/reference/functions/esc_attr/)`wp-includes/formatting.php` |

Escaping for HTML attributes.

  | 
| [number_format_i18n()](https://developer.wordpress.org/reference/functions/number_format_i18n/)`wp-includes/functions.php` |

Converts float number to format based on the locale.

  |

[Show 3 more](https://developer.wordpress.org/reference/classes/WP_Screen/render_screen_layout/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/WP_Screen/render_screen_layout/?output_format=md#)

| Used by | Description | 
| [WP_Screen::render_screen_options()](https://developer.wordpress.org/reference/classes/wp_screen/render_screen_options/)`wp-admin/includes/class-wp-screen.php` |

Renders the screen options tab.

  |

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

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

## User Contributed Notes

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