Unregister Genesis layout settings

In some situations, you might want to unregister Genesis layout settings so it doesn’t show up in the WordPress backend.

For example, when your theme is only optimised for one or two layouts, you want to unregister the other layouts so they do not show up in the dashboard.

Code snippets

Add the code to your functions.php file.

Content-sidebar layout

[php title="functions.php"]
//* Unregister content-sidebar layout setting
genesis_unregister_layout( 'content-sidebar' );
[/php]

Sidebar-content layout

[php title="functions.php"]
//* Unregister sidebar-content layout setting
genesis_unregister_layout( 'sidebar-content' );
[/php]

Content-sidebar-sidebar layout

[php title="functions.php"]
//* Unregister content-sidebar-sidebar layout setting
genesis_unregister_layout( 'content-sidebar-sidebar' );
[/php]

Sidebar-sidebar-content layout

[php title="functions.php"]
//* Unregister sidebar-sidebar-content layout setting
genesis_unregister_layout( 'sidebar-sidebar-content' );
[/php]

Sidebar-content-sidebar layout

[php title="functions.php"]
//* Unregister sidebar-content-sidebar layout setting
genesis_unregister_layout( 'sidebar-content-sidebar' );
[/php]

Full-width content layout

[php title="functions.php"]
//* Unregister full-width content layout setting
genesis_unregister_layout( 'full-width-content' );
[/php]

Remove layout settings

You can remove the Genesis Layout Settings completely using the following snippet.

[php]
//* Remove Genesis Layout Settings
remove_theme_support( 'genesis-inpost-layouts' );
[/php]

See also

If you do not need to unregister a particular layout setting to prevent it from showing up in the backend, and wish to only have a page use a particular layout setting, you can force Genesis layout settings.