Skip to content

Instantly share code, notes, and snippets.

@bgallagh3r
Created August 18, 2015 15:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bgallagh3r/e0ac97618422b7ccbca0 to your computer and use it in GitHub Desktop.
Save bgallagh3r/e0ac97618422b7ccbca0 to your computer and use it in GitHub Desktop.
Set WordPress Dashboard to Single Column
// force one-column dashboard
function shapeSpace_screen_layout_columns($columns) {
$columns['dashboard'] = 1;
return $columns;
}
add_filter('screen_layout_columns', 'shapeSpace_screen_layout_columns');
function shapeSpace_screen_layout_dashboard() { return 1; }
add_filter('get_user_option_screen_layout_dashboard', 'shapeSpace_screen_layout_dashboard');
add_action( 'admin_head-index.php', function()
{
?>
<style>
.postbox-container {
min-width: 100% !important;
}
.meta-box-sortables.ui-sortable.empty-container {
display: none;
}
</style>
<?php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment