Created
August 18, 2015 15:47
-
-
Save bgallagh3r/e0ac97618422b7ccbca0 to your computer and use it in GitHub Desktop.
Set WordPress Dashboard to Single Column
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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