Wordpress - how do I force a single column layout in screen layout
You can use the filter screen_layout_columns
to set only one column for the post screen get_user_option_screen_layout_post
to force the user option to 1.
If you want to use that for custom post type then use
get_user_option_screen_layout_{post_type}
The following code will do it:
function so_screen_layout_columns( $columns ) {
$columns['post'] = 1;
return $columns;
}
add_filter( 'screen_layout_columns', 'so_screen_layout_columns' );
function so_screen_layout_post() {
return 1;
}
add_filter( 'get_user_option_screen_layout_post', 'so_screen_layout_post' );
simply you can do that :
add_filter('get_user_option_screen_layout_{$post_type}', 'your_callback' );
example with "message" post type :
add_filter('get_user_option_screen_layout_message', function() {
return 1;
} );
You can use '__return_true' in your callback.
see: http://codex.wordpress.org/Function_Reference/get_user_option