I’ve created a plugin using custom post types and I need to force the default two column post page to a single column. At the same time, the Publish metabox must move to the bottom. I need to do this via the functions some how.
I have some solutions from WPSE, but the only solution I’ve found actually hides the “Publish” metabox. I can’t seem to figure out why.
Any ideas of how to do this?
There is a filter called get_user_option_meta-box-order_{$page}
where $page
is the name of the post type. Just make sure that submitdiv
is the last value in the array:
add_filter( 'get_user_option_meta-box-order_post', 'wpse25793_one_column_for_all' );
function wpse25793_one_column_for_all( $order )
{
return array(
'normal' => join( ",", array(
'postexcerpt',
'formatdiv',
'trackbacksdiv',
'tagsdiv-post_tag',
'categorydiv',
'postimagediv',
'postcustom',
'commentstatusdiv',
'slugdiv',
'authordiv',
'submitdiv',
) ),
'side' => '',
'advanced' => '',
);
}